-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update generated files with build 130446
- Loading branch information
Microsoft Graph DevX Tooling
authored and
Microsoft Graph DevX Tooling
committed
Dec 12, 2023
1 parent
d4125bd
commit 50806cb
Showing
168 changed files
with
9,109 additions
and
7,794 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
// tslint:disable | ||
// eslint-disable | ||
// Generated by Microsoft Kiota | ||
import { createPronounsSettingsFromDiscriminatorValue, deserializeIntoPronounsSettings, serializePronounsSettings, type PronounsSettings } from '../../../models/'; | ||
import { createODataErrorFromDiscriminatorValue, deserializeIntoODataError, serializeODataError, type ODataError } from '../../../models/oDataErrors/'; | ||
import { BaseRequestBuilder, HttpMethod, RequestInformation, type Parsable, type ParsableFactory, type RequestAdapter, type RequestConfiguration, type RequestOption } from '@microsoft/kiota-abstractions'; | ||
|
||
export interface PronounsRequestBuilderGetQueryParameters { | ||
/** | ||
* Expand related entities | ||
*/ | ||
expand?: string[]; | ||
/** | ||
* Select properties to be returned | ||
*/ | ||
select?: string[]; | ||
} | ||
/** | ||
* Provides operations to manage the pronouns property of the microsoft.graph.peopleAdminSettings entity. | ||
*/ | ||
export class PronounsRequestBuilder extends BaseRequestBuilder<PronounsRequestBuilder> { | ||
/** | ||
* Instantiates a new PronounsRequestBuilder and sets the default values. | ||
* @param pathParameters The raw url or the Url template parameters for the request. | ||
* @param requestAdapter The request adapter to use to execute the requests. | ||
*/ | ||
public constructor(pathParameters: Record<string, unknown> | string | undefined, requestAdapter: RequestAdapter) { | ||
super(pathParameters, requestAdapter, "{+baseurl}/admin/people/pronouns{?%24select,%24expand}", (x, y) => new PronounsRequestBuilder(x, y)); | ||
} | ||
/** | ||
* Get the properties of the pronounsSettings resource for an organization. For more information on settings to manage pronouns support, see Manage pronouns settings for an organization using the Microsoft Graph API. | ||
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. | ||
* @returns a Promise of PronounsSettings | ||
* @see {@link https://learn.microsoft.com/graph/api/peopleadminsettings-list-pronouns?view=graph-rest-1.0|Find more info here} | ||
*/ | ||
public get(requestConfiguration?: RequestConfiguration<PronounsRequestBuilderGetQueryParameters> | undefined) : Promise<PronounsSettings | undefined> { | ||
const requestInfo = this.toGetRequestInformation( | ||
requestConfiguration | ||
); | ||
const errorMapping = { | ||
"4XX": createODataErrorFromDiscriminatorValue, | ||
"5XX": createODataErrorFromDiscriminatorValue, | ||
} as Record<string, ParsableFactory<Parsable>>; | ||
return this.requestAdapter.sendAsync<PronounsSettings>(requestInfo, createPronounsSettingsFromDiscriminatorValue, errorMapping); | ||
} | ||
/** | ||
* Update the properties of a pronounsSettings object in an organization. For more information on settings to manage pronouns support, see Manage pronouns settings for an organization using the Microsoft Graph API. | ||
* @param body The request body | ||
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. | ||
* @returns a Promise of PronounsSettings | ||
* @see {@link https://learn.microsoft.com/graph/api/pronounssettings-update?view=graph-rest-1.0|Find more info here} | ||
*/ | ||
public patch(body: PronounsSettings, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<PronounsSettings | undefined> { | ||
const requestInfo = this.toPatchRequestInformation( | ||
body, requestConfiguration | ||
); | ||
const errorMapping = { | ||
"4XX": createODataErrorFromDiscriminatorValue, | ||
"5XX": createODataErrorFromDiscriminatorValue, | ||
} as Record<string, ParsableFactory<Parsable>>; | ||
return this.requestAdapter.sendAsync<PronounsSettings>(requestInfo, createPronounsSettingsFromDiscriminatorValue, errorMapping); | ||
} | ||
/** | ||
* Get the properties of the pronounsSettings resource for an organization. For more information on settings to manage pronouns support, see Manage pronouns settings for an organization using the Microsoft Graph API. | ||
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. | ||
* @returns a RequestInformation | ||
*/ | ||
public toGetRequestInformation(requestConfiguration?: RequestConfiguration<PronounsRequestBuilderGetQueryParameters> | undefined) : RequestInformation { | ||
const requestInfo = new RequestInformation(HttpMethod.GET, this.urlTemplate, this.pathParameters); | ||
requestInfo.configure(requestConfiguration, pronounsRequestBuilderGetQueryParametersMapper); | ||
requestInfo.headers.tryAdd("Accept", "application/json"); | ||
return requestInfo; | ||
} | ||
/** | ||
* Update the properties of a pronounsSettings object in an organization. For more information on settings to manage pronouns support, see Manage pronouns settings for an organization using the Microsoft Graph API. | ||
* @param body The request body | ||
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. | ||
* @returns a RequestInformation | ||
*/ | ||
public toPatchRequestInformation(body: PronounsSettings, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation { | ||
if(!body) throw new Error("body cannot be undefined"); | ||
const requestInfo = new RequestInformation(HttpMethod.PATCH, this.urlTemplate, this.pathParameters); | ||
requestInfo.configure(requestConfiguration); | ||
requestInfo.headers.tryAdd("Accept", "application/json"); | ||
requestInfo.setContentFromParsable(this.requestAdapter, "application/json", body, serializePronounsSettings); | ||
return requestInfo; | ||
} | ||
} | ||
const pronounsRequestBuilderGetQueryParametersMapper: Record<string, string> = { | ||
"expand": "%24expand", | ||
"select": "%24select", | ||
}; | ||
// tslint:enable | ||
// eslint-enable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.