|
| 1 | +/* tslint:disable */ |
| 2 | +/* eslint-disable */ |
| 3 | +// Generated by Microsoft Kiota |
| 4 | +// @ts-ignore |
| 5 | +import { createODataErrorFromDiscriminatorValue, type ODataError } from '@microsoft/msgraph-sdk/models/oDataErrors/index.js'; |
| 6 | +// @ts-ignore |
| 7 | +import { createTeamsPolicyAssignmentFromDiscriminatorValue, serializeTeamsPolicyAssignment, type TeamsPolicyAssignment } from '@microsoft/msgraph-sdk/models/teamsAdministration/index.js'; |
| 8 | +// @ts-ignore |
| 9 | +import { MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilderRequestsMetadata, type MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilder } from './microsoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName/index.js'; |
| 10 | +// @ts-ignore |
| 11 | +import { type UserAssignmentsRequestBuilder, UserAssignmentsRequestBuilderNavigationMetadata, UserAssignmentsRequestBuilderRequestsMetadata } from './userAssignments/index.js'; |
| 12 | +// @ts-ignore |
| 13 | +import { type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions'; |
| 14 | + |
| 15 | +/** |
| 16 | + * Provides operations to manage the policy property of the microsoft.graph.teamsAdministration.teamsAdminRoot entity. |
| 17 | + */ |
| 18 | +export interface PolicyRequestBuilder extends BaseRequestBuilder<PolicyRequestBuilder> { |
| 19 | + /** |
| 20 | + * Provides operations to manage the userAssignments property of the microsoft.graph.teamsAdministration.teamsPolicyAssignment entity. |
| 21 | + */ |
| 22 | + get userAssignments(): UserAssignmentsRequestBuilder; |
| 23 | + /** |
| 24 | + * Delete navigation property policy for admin |
| 25 | + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. |
| 26 | + * @throws {ODataError} error when the service returns a 4XX or 5XX status code |
| 27 | + */ |
| 28 | + delete(requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<void>; |
| 29 | + /** |
| 30 | + * Represents a navigation property to the Teams policy assignment object. |
| 31 | + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. |
| 32 | + * @returns {Promise<TeamsPolicyAssignment>} |
| 33 | + * @throws {ODataError} error when the service returns a 4XX or 5XX status code |
| 34 | + */ |
| 35 | + get(requestConfiguration?: RequestConfiguration<PolicyRequestBuilderGetQueryParameters> | undefined) : Promise<TeamsPolicyAssignment | undefined>; |
| 36 | + /** |
| 37 | + * Provides operations to call the getPolicyId method. |
| 38 | + * @param name Usage: name='{name}' |
| 39 | + * @param type Usage: type='{type}' |
| 40 | + * @returns {MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilder} |
| 41 | + */ |
| 42 | + microsoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName(name: string | undefined, type: string | undefined) : MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilder; |
| 43 | + /** |
| 44 | + * Update the navigation property policy in admin |
| 45 | + * @param body The request body |
| 46 | + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. |
| 47 | + * @returns {Promise<TeamsPolicyAssignment>} |
| 48 | + * @throws {ODataError} error when the service returns a 4XX or 5XX status code |
| 49 | + */ |
| 50 | + patch(body: TeamsPolicyAssignment, requestConfiguration?: RequestConfiguration<object> | undefined) : Promise<TeamsPolicyAssignment | undefined>; |
| 51 | + /** |
| 52 | + * Delete navigation property policy for admin |
| 53 | + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. |
| 54 | + * @returns {RequestInformation} |
| 55 | + */ |
| 56 | + toDeleteRequestInformation(requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation; |
| 57 | + /** |
| 58 | + * Represents a navigation property to the Teams policy assignment object. |
| 59 | + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. |
| 60 | + * @returns {RequestInformation} |
| 61 | + */ |
| 62 | + toGetRequestInformation(requestConfiguration?: RequestConfiguration<PolicyRequestBuilderGetQueryParameters> | undefined) : RequestInformation; |
| 63 | + /** |
| 64 | + * Update the navigation property policy in admin |
| 65 | + * @param body The request body |
| 66 | + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. |
| 67 | + * @returns {RequestInformation} |
| 68 | + */ |
| 69 | + toPatchRequestInformation(body: TeamsPolicyAssignment, requestConfiguration?: RequestConfiguration<object> | undefined) : RequestInformation; |
| 70 | +} |
| 71 | +/** |
| 72 | + * Represents a navigation property to the Teams policy assignment object. |
| 73 | + */ |
| 74 | +export interface PolicyRequestBuilderGetQueryParameters { |
| 75 | + /** |
| 76 | + * Expand related entities |
| 77 | + */ |
| 78 | + expand?: string[]; |
| 79 | + /** |
| 80 | + * Select properties to be returned |
| 81 | + */ |
| 82 | + select?: string[]; |
| 83 | +} |
| 84 | +/** |
| 85 | + * Uri template for the request builder. |
| 86 | + */ |
| 87 | +export const PolicyRequestBuilderUriTemplate = "{+baseurl}/admin/teams/policy{?%24expand,%24select}"; |
| 88 | +/** |
| 89 | + * Mapper for query parameters from symbol name to serialization name represented as a constant. |
| 90 | + */ |
| 91 | +const PolicyRequestBuilderGetQueryParametersMapper: Record<string, string> = { |
| 92 | + "expand": "%24expand", |
| 93 | + "select": "%24select", |
| 94 | +}; |
| 95 | +/** |
| 96 | + * Metadata for all the navigation properties in the request builder. |
| 97 | + */ |
| 98 | +export const PolicyRequestBuilderNavigationMetadata: Record<Exclude<keyof PolicyRequestBuilder, KeysToExcludeForNavigationMetadata>, NavigationMetadata> = { |
| 99 | + microsoftGraphTeamsAdministrationGetPolicyIdWithTypeWithName: { |
| 100 | + requestsMetadata: MicrosoftGraphTeamsAdministrationGetPolicyIdWithTypeWithNameRequestBuilderRequestsMetadata, |
| 101 | + pathParametersMappings: ["name", "type"], |
| 102 | + }, |
| 103 | + userAssignments: { |
| 104 | + requestsMetadata: UserAssignmentsRequestBuilderRequestsMetadata, |
| 105 | + navigationMetadata: UserAssignmentsRequestBuilderNavigationMetadata, |
| 106 | + }, |
| 107 | +}; |
| 108 | +/** |
| 109 | + * Metadata for all the requests in the request builder. |
| 110 | + */ |
| 111 | +export const PolicyRequestBuilderRequestsMetadata: RequestsMetadata = { |
| 112 | + delete: { |
| 113 | + uriTemplate: PolicyRequestBuilderUriTemplate, |
| 114 | + responseBodyContentType: "application/json", |
| 115 | + errorMappings: { |
| 116 | + XXX: createODataErrorFromDiscriminatorValue as ParsableFactory<Parsable>, |
| 117 | + }, |
| 118 | + adapterMethodName: "sendNoResponseContent", |
| 119 | + }, |
| 120 | + get: { |
| 121 | + uriTemplate: PolicyRequestBuilderUriTemplate, |
| 122 | + responseBodyContentType: "application/json", |
| 123 | + errorMappings: { |
| 124 | + XXX: createODataErrorFromDiscriminatorValue as ParsableFactory<Parsable>, |
| 125 | + }, |
| 126 | + adapterMethodName: "send", |
| 127 | + responseBodyFactory: createTeamsPolicyAssignmentFromDiscriminatorValue, |
| 128 | + queryParametersMapper: PolicyRequestBuilderGetQueryParametersMapper, |
| 129 | + }, |
| 130 | + patch: { |
| 131 | + uriTemplate: PolicyRequestBuilderUriTemplate, |
| 132 | + responseBodyContentType: "application/json", |
| 133 | + errorMappings: { |
| 134 | + XXX: createODataErrorFromDiscriminatorValue as ParsableFactory<Parsable>, |
| 135 | + }, |
| 136 | + adapterMethodName: "send", |
| 137 | + responseBodyFactory: createTeamsPolicyAssignmentFromDiscriminatorValue, |
| 138 | + requestBodyContentType: "application/json", |
| 139 | + requestBodySerializer: serializeTeamsPolicyAssignment, |
| 140 | + requestInformationContentSetMethod: "setContentFromParsable", |
| 141 | + }, |
| 142 | +}; |
| 143 | +/* tslint:enable */ |
| 144 | +/* eslint-enable */ |
0 commit comments