From bdc303eede66d60e7a090202d1b168338ba56bda Mon Sep 17 00:00:00 2001 From: Microsoft Graph DevX Tooling Date: Tue, 23 May 2023 10:28:11 +0000 Subject: [PATCH] Update generated files with build 115280 --- .../Item/ApplicationItemRequestBuilder.cs | 5 + .../AcquireAccessTokenPostRequestBody.cs | 64 ++++ .../AcquireAccessTokenRequestBuilder.cs | 94 ++++++ .../Jobs/Count/CountRequestBuilder.cs | 118 ++++++++ .../Jobs/Item/Pause/PauseRequestBuilder.cs | 89 ++++++ .../ProvisionOnDemandPostRequestBody.cs | 64 ++++ .../ProvisionOnDemandRequestBuilder.cs | 96 ++++++ .../Item/Restart/RestartPostRequestBody.cs | 64 ++++ .../Item/Restart/RestartRequestBuilder.cs | 94 ++++++ .../Directories/Count/CountRequestBuilder.cs | 118 ++++++++ .../Directories/DirectoriesRequestBuilder.cs | 235 +++++++++++++++ .../DirectoryDefinitionItemRequestBuilder.cs | 248 ++++++++++++++++ .../Item/Discover/DiscoverRequestBuilder.cs | 91 ++++++ .../FilterOperatorsRequestBuilder.cs | 147 ++++++++++ .../FilterOperatorsResponse.cs | 49 ++++ .../Functions/FunctionsRequestBuilder.cs | 147 ++++++++++ .../Schema/Functions/FunctionsResponse.cs | 49 ++++ .../ParseExpressionPostRequestBody.cs | 96 ++++++ .../ParseExpressionRequestBuilder.cs | 96 ++++++ .../Jobs/Item/Schema/SchemaRequestBuilder.cs | 263 +++++++++++++++++ .../Jobs/Item/Start/StartRequestBuilder.cs | 89 ++++++ .../SynchronizationJobItemRequestBuilder.cs | 273 ++++++++++++++++++ .../ValidateCredentialsPostRequestBody.cs | 103 +++++++ .../ValidateCredentialsRequestBuilder.cs | 94 ++++++ .../Jobs/JobsRequestBuilder.cs | 240 +++++++++++++++ .../ValidateCredentialsPostRequestBody.cs | 103 +++++++ .../ValidateCredentialsRequestBuilder.cs | 94 ++++++ .../Secrets/Count/CountRequestBuilder.cs | 118 ++++++++ .../Secrets/SecretsRequestBuilder.cs | 102 +++++++ .../SynchronizationRequestBuilder.cs | 263 +++++++++++++++++ .../Templates/Count/CountRequestBuilder.cs | 118 ++++++++ .../Directories/Count/CountRequestBuilder.cs | 118 ++++++++ .../Directories/DirectoriesRequestBuilder.cs | 235 +++++++++++++++ .../DirectoryDefinitionItemRequestBuilder.cs | 248 ++++++++++++++++ .../Item/Discover/DiscoverRequestBuilder.cs | 91 ++++++ .../FilterOperatorsRequestBuilder.cs | 147 ++++++++++ .../FilterOperatorsResponse.cs | 49 ++++ .../Functions/FunctionsRequestBuilder.cs | 147 ++++++++++ .../Schema/Functions/FunctionsResponse.cs | 49 ++++ .../ParseExpressionPostRequestBody.cs | 96 ++++++ .../ParseExpressionRequestBuilder.cs | 96 ++++++ .../Item/Schema/SchemaRequestBuilder.cs | 263 +++++++++++++++++ ...nchronizationTemplateItemRequestBuilder.cs | 248 ++++++++++++++++ .../Templates/TemplatesRequestBuilder.cs | 235 +++++++++++++++ .../Generated/BaseGraphServiceClient.cs | 10 + .../Item/Replies/RepliesRequestBuilder.cs | 6 +- .../Item/Messages/MessagesRequestBuilder.cs | 6 +- .../Invite/InviteRequestBuilder.cs | 6 +- .../Item/Columns/ColumnsRequestBuilder.cs | 2 +- .../Workbook/Tables/TablesRequestBuilder.cs | 2 +- .../Item/Charts/ChartsRequestBuilder.cs | 2 +- .../Item/Series/SeriesRequestBuilder.cs | 2 +- .../Item/Columns/ColumnsRequestBuilder.cs | 2 +- .../Count/CountRequestBuilder.cs | 118 ++++++++ .../FilterOperatorsRequestBuilder.cs | 235 +++++++++++++++ .../FilterOperatorSchemaItemRequestBuilder.cs | 243 ++++++++++++++++ .../Functions/Count/CountRequestBuilder.cs | 118 ++++++++ .../Functions/FunctionsRequestBuilder.cs | 235 +++++++++++++++ ...MappingFunctionSchemaItemRequestBuilder.cs | 243 ++++++++++++++++ .../ConversationsRequestBuilder.cs | 6 +- .../Item/ConversationItemRequestBuilder.cs | 10 +- .../Threads/Item/Posts/PostsRequestBuilder.cs | 8 +- .../Threads/Item/Reply/ReplyRequestBuilder.cs | 6 +- .../Groups/Item/GroupItemRequestBuilder.cs | 6 +- .../Item/Lists/Item/ListItemRequestBuilder.cs | 8 +- .../Item/Replies/RepliesRequestBuilder.cs | 6 +- .../Item/Messages/MessagesRequestBuilder.cs | 6 +- .../Item/Replies/RepliesRequestBuilder.cs | 6 +- .../Messages/MessagesRequestBuilder.cs | 6 +- .../ConversationThreadItemRequestBuilder.cs | 10 +- .../Threads/Item/Posts/PostsRequestBuilder.cs | 8 +- .../Threads/Item/Reply/ReplyRequestBuilder.cs | 6 +- .../Item/NamedLocationItemRequestBuilder.cs | 14 +- .../Item/AgreementItemRequestBuilder.cs | 8 +- .../Item/Replies/RepliesRequestBuilder.cs | 6 +- .../Item/Messages/MessagesRequestBuilder.cs | 6 +- .../Item/Replies/RepliesRequestBuilder.cs | 6 +- .../Item/Messages/MessagesRequestBuilder.cs | 6 +- .../Item/Replies/RepliesRequestBuilder.cs | 6 +- .../Messages/MessagesRequestBuilder.cs | 6 +- .../Item/MailFolderItemRequestBuilder.cs | 6 +- .../Generated/Me/MeRequestBuilder.cs | 8 +- .../Item/MessageItemRequestBuilder.cs | 2 +- .../Me/Messages/MessagesRequestBuilder.cs | 6 +- .../Generated/Models/Application.cs | 16 + .../Generated/Models/AttributeDefinition.cs | 192 ++++++++++++ .../Models/AttributeDefinitionMetadata.cs | 24 ++ .../AttributeDefinitionMetadataEntry.cs | 86 ++++++ .../Generated/Models/AttributeFlowBehavior.cs | 10 + .../Generated/Models/AttributeFlowType.cs | 16 + .../Generated/Models/AttributeMapping.cs | 139 +++++++++ .../Models/AttributeMappingFunctionSchema.cs | 48 +++ ...MappingFunctionSchemaCollectionResponse.cs | 48 +++ .../Models/AttributeMappingParameterSchema.cs | 100 +++++++ .../Models/AttributeMappingSource.cs | 118 ++++++++ .../Models/AttributeMappingSourceType.cs | 12 + .../Generated/Models/AttributeType.cs | 18 ++ .../Generated/Models/ChatMessage.cs | 2 +- .../Models/ChatMessageHistoryItem.cs | 4 +- .../Generated/Models/CollapseProperty.cs | 86 ++++++ .../Generated/Models/ContainerFilter.cs | 79 +++++ .../Generated/Models/Contract.cs | 2 +- .../Models/DefaultUserRolePermissions.cs | 7 + .../Generated/Models/DeviceCategory.cs | 3 - .../Generated/Models/DirectoryDefinition.cs | 101 +++++++ .../DirectoryDefinitionCollectionResponse.cs | 48 +++ .../DirectoryDefinitionDiscoverabilities.cs | 18 ++ .../Generated/Models/DirectoryRoleTemplate.cs | 2 +- .../Generated/Models/Entity.cs | 7 + .../Generated/Models/EntityType.cs | 4 + .../Generated/Models/ExpressionInputObject.cs | 95 ++++++ .../Generated/Models/Filter.cs | 111 +++++++ .../Generated/Models/FilterClause.cs | 111 +++++++ .../Generated/Models/FilterGroup.cs | 95 ++++++ .../Generated/Models/FilterOperand.cs | 79 +++++ .../Generated/Models/FilterOperatorSchema.cs | 62 ++++ .../FilterOperatorSchemaCollectionResponse.cs | 48 +++ src/Microsoft.Graph/Generated/Models/Group.cs | 2 +- .../Generated/Models/GroupFilter.cs | 79 +++++ .../Models/IosUpdateConfiguration.cs | 5 +- .../Generated/Models/Mutability.cs | 14 + .../Generated/Models/ObjectDefinition.cs | 127 ++++++++ .../Models/ObjectDefinitionMetadata.cs | 20 ++ .../Models/ObjectDefinitionMetadataEntry.cs | 86 ++++++ .../Generated/Models/ObjectFlowTypes.cs | 14 + .../Generated/Models/ObjectMapping.cs | 173 +++++++++++ .../Generated/Models/ObjectMappingMetadata.cs | 20 ++ .../Models/ObjectMappingMetadataEntry.cs | 86 ++++++ ...lineMeetingContentSharingDisabledReason.cs | 10 + .../Models/OnlineMeetingRestricted.cs | 77 +++++ .../OnlineMeetingVideoDisabledReason.cs | 10 + .../Generated/Models/OutlookCategory.cs | 2 +- .../Models/ParseExpressionResponse.cs | 125 ++++++++ .../Generated/Models/Participant.cs | 16 + .../Generated/Models/QuarantineReason.cs | 22 ++ .../Generated/Models/ReferencedObject.cs | 95 ++++++ .../Generated/Models/RoleDefinition.cs | 3 - .../ScopeOperatorMultiValuedComparisonType.cs | 10 + .../Generated/Models/ScopeOperatorType.cs | 10 + .../Generated/Models/SearchHit.cs | 7 + .../Generated/Models/SearchRequest.cs | 16 + .../EdiscoveryNoncustodialDataSource.cs | 2 +- .../Generated/Models/ServicePrincipal.cs | 16 + ...tringKeyAttributeMappingSourceValuePair.cs | 95 ++++++ .../Models/StringKeyLongValuePair.cs | 86 ++++++ .../Models/StringKeyObjectValuePair.cs | 79 +++++ .../Models/StringKeyStringValuePair.cs | 95 ++++++ .../Generated/Models/SubscribedSku.cs | 48 +++ .../Generated/Models/Synchronization.cs | 80 +++++ .../Generated/Models/SynchronizationError.cs | 102 +++++++ .../Generated/Models/SynchronizationJob.cs | 112 +++++++ ...SynchronizationJobApplicationParameters.cs | 95 ++++++ .../SynchronizationJobCollectionResponse.cs | 48 +++ .../SynchronizationJobRestartCriteria.cs | 70 +++++ .../Models/SynchronizationJobRestartScope.cs | 20 ++ .../Models/SynchronizationJobSubject.cs | 111 +++++++ .../Models/SynchronizationLinkedObjects.cs | 111 +++++++ .../Models/SynchronizationMetadata.cs | 24 ++ .../Models/SynchronizationMetadataEntry.cs | 86 ++++++ .../Models/SynchronizationProgress.cs | 100 +++++++ .../Models/SynchronizationQuarantine.cs | 114 ++++++++ .../Generated/Models/SynchronizationRule.cs | 205 +++++++++++++ .../Models/SynchronizationSchedule.cs | 84 ++++++ .../Models/SynchronizationScheduleState.cs | 12 + .../Generated/Models/SynchronizationSchema.cs | 80 +++++ .../Generated/Models/SynchronizationSecret.cs | 96 ++++++ ...SynchronizationSecretKeyStringValuePair.cs | 86 ++++++ .../Generated/Models/SynchronizationStatus.cs | 210 ++++++++++++++ .../Models/SynchronizationStatusCode.cs | 16 + .../Models/SynchronizationTaskExecution.cs | 179 ++++++++++++ .../SynchronizationTaskExecutionResult.cs | 12 + .../Models/SynchronizationTemplate.cs | 117 ++++++++ ...nchronizationTemplateCollectionResponse.cs | 48 +++ .../Generated/Models/TermsAndConditions.cs | 3 + .../IdentitySynchronizationRequestBuilder.cs | 6 +- .../ServicePrincipalItemRequestBuilder.cs | 5 + .../AcquireAccessTokenPostRequestBody.cs | 64 ++++ .../AcquireAccessTokenRequestBuilder.cs | 94 ++++++ .../Jobs/Count/CountRequestBuilder.cs | 118 ++++++++ .../Jobs/Item/Pause/PauseRequestBuilder.cs | 89 ++++++ .../ProvisionOnDemandPostRequestBody.cs | 64 ++++ .../ProvisionOnDemandRequestBuilder.cs | 96 ++++++ .../Item/Restart/RestartPostRequestBody.cs | 64 ++++ .../Item/Restart/RestartRequestBuilder.cs | 94 ++++++ .../Directories/Count/CountRequestBuilder.cs | 118 ++++++++ .../Directories/DirectoriesRequestBuilder.cs | 235 +++++++++++++++ .../DirectoryDefinitionItemRequestBuilder.cs | 248 ++++++++++++++++ .../Item/Discover/DiscoverRequestBuilder.cs | 91 ++++++ .../FilterOperatorsRequestBuilder.cs | 147 ++++++++++ .../FilterOperatorsResponse.cs | 49 ++++ .../Functions/FunctionsRequestBuilder.cs | 147 ++++++++++ .../Schema/Functions/FunctionsResponse.cs | 49 ++++ .../ParseExpressionPostRequestBody.cs | 96 ++++++ .../ParseExpressionRequestBuilder.cs | 96 ++++++ .../Jobs/Item/Schema/SchemaRequestBuilder.cs | 263 +++++++++++++++++ .../Jobs/Item/Start/StartRequestBuilder.cs | 89 ++++++ .../SynchronizationJobItemRequestBuilder.cs | 273 ++++++++++++++++++ .../ValidateCredentialsPostRequestBody.cs | 103 +++++++ .../ValidateCredentialsRequestBuilder.cs | 94 ++++++ .../Jobs/JobsRequestBuilder.cs | 240 +++++++++++++++ .../ValidateCredentialsPostRequestBody.cs | 103 +++++++ .../ValidateCredentialsRequestBuilder.cs | 94 ++++++ .../Secrets/Count/CountRequestBuilder.cs | 118 ++++++++ .../Secrets/SecretsRequestBuilder.cs | 102 +++++++ .../SynchronizationRequestBuilder.cs | 263 +++++++++++++++++ .../Templates/Count/CountRequestBuilder.cs | 118 ++++++++ .../Directories/Count/CountRequestBuilder.cs | 118 ++++++++ .../Directories/DirectoriesRequestBuilder.cs | 235 +++++++++++++++ .../DirectoryDefinitionItemRequestBuilder.cs | 248 ++++++++++++++++ .../Item/Discover/DiscoverRequestBuilder.cs | 91 ++++++ .../FilterOperatorsRequestBuilder.cs | 147 ++++++++++ .../FilterOperatorsResponse.cs | 49 ++++ .../Functions/FunctionsRequestBuilder.cs | 147 ++++++++++ .../Schema/Functions/FunctionsResponse.cs | 49 ++++ .../ParseExpressionPostRequestBody.cs | 96 ++++++ .../ParseExpressionRequestBuilder.cs | 96 ++++++ .../Item/Schema/SchemaRequestBuilder.cs | 263 +++++++++++++++++ ...nchronizationTemplateItemRequestBuilder.cs | 248 ++++++++++++++++ .../Templates/TemplatesRequestBuilder.cs | 235 +++++++++++++++ .../Item/Lists/Item/ListItemRequestBuilder.cs | 8 +- .../Generated/Sites/SitesRequestBuilder.cs | 6 +- .../Item/Replies/RepliesRequestBuilder.cs | 6 +- .../Item/Messages/MessagesRequestBuilder.cs | 6 +- .../Item/Replies/RepliesRequestBuilder.cs | 6 +- .../Messages/MessagesRequestBuilder.cs | 6 +- .../Item/Replies/RepliesRequestBuilder.cs | 6 +- .../Item/Messages/MessagesRequestBuilder.cs | 6 +- .../Item/Replies/RepliesRequestBuilder.cs | 6 +- .../Item/Messages/MessagesRequestBuilder.cs | 6 +- .../Item/Replies/RepliesRequestBuilder.cs | 6 +- .../Item/Messages/MessagesRequestBuilder.cs | 6 +- .../Item/Replies/RepliesRequestBuilder.cs | 6 +- .../Messages/MessagesRequestBuilder.cs | 6 +- .../Item/MailFolderItemRequestBuilder.cs | 6 +- .../Item/MessageItemRequestBuilder.cs | 2 +- .../Item/Messages/MessagesRequestBuilder.cs | 6 +- .../Generated/Users/UsersRequestBuilder.cs | 8 +- src/Microsoft.Graph/Generated/kiota-lock.json | 4 +- 238 files changed, 18497 insertions(+), 177 deletions(-) create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/AcquireAccessToken/AcquireAccessTokenPostRequestBody.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/AcquireAccessToken/AcquireAccessTokenRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Count/CountRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Pause/PauseRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/ProvisionOnDemand/ProvisionOnDemandPostRequestBody.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/ProvisionOnDemand/ProvisionOnDemandRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Restart/RestartPostRequestBody.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Restart/RestartRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Directories/Count/CountRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Directories/DirectoriesRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Directories/Item/DirectoryDefinitionItemRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Directories/Item/Discover/DiscoverRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/FilterOperators/FilterOperatorsRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/FilterOperators/FilterOperatorsResponse.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Functions/FunctionsRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Functions/FunctionsResponse.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/ParseExpression/ParseExpressionPostRequestBody.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/ParseExpression/ParseExpressionRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/SchemaRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Start/StartRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/SynchronizationJobItemRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/ValidateCredentials/ValidateCredentialsPostRequestBody.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/ValidateCredentials/ValidateCredentialsRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/JobsRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/ValidateCredentials/ValidateCredentialsPostRequestBody.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/ValidateCredentials/ValidateCredentialsRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Secrets/Count/CountRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Secrets/SecretsRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/SynchronizationRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Count/CountRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Directories/Count/CountRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Directories/DirectoriesRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Directories/Item/DirectoryDefinitionItemRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Directories/Item/Discover/DiscoverRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/FilterOperators/FilterOperatorsRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/FilterOperators/FilterOperatorsResponse.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Functions/FunctionsRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Functions/FunctionsResponse.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/ParseExpression/ParseExpressionPostRequestBody.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/ParseExpression/ParseExpressionRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/SchemaRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/SynchronizationTemplateItemRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/TemplatesRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/FilterOperators/Count/CountRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/FilterOperators/FilterOperatorsRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/FilterOperators/Item/FilterOperatorSchemaItemRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Functions/Count/CountRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Functions/FunctionsRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Functions/Item/AttributeMappingFunctionSchemaItemRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/Models/AttributeDefinition.cs create mode 100644 src/Microsoft.Graph/Generated/Models/AttributeDefinitionMetadata.cs create mode 100644 src/Microsoft.Graph/Generated/Models/AttributeDefinitionMetadataEntry.cs create mode 100644 src/Microsoft.Graph/Generated/Models/AttributeFlowBehavior.cs create mode 100644 src/Microsoft.Graph/Generated/Models/AttributeFlowType.cs create mode 100644 src/Microsoft.Graph/Generated/Models/AttributeMapping.cs create mode 100644 src/Microsoft.Graph/Generated/Models/AttributeMappingFunctionSchema.cs create mode 100644 src/Microsoft.Graph/Generated/Models/AttributeMappingFunctionSchemaCollectionResponse.cs create mode 100644 src/Microsoft.Graph/Generated/Models/AttributeMappingParameterSchema.cs create mode 100644 src/Microsoft.Graph/Generated/Models/AttributeMappingSource.cs create mode 100644 src/Microsoft.Graph/Generated/Models/AttributeMappingSourceType.cs create mode 100644 src/Microsoft.Graph/Generated/Models/AttributeType.cs create mode 100644 src/Microsoft.Graph/Generated/Models/CollapseProperty.cs create mode 100644 src/Microsoft.Graph/Generated/Models/ContainerFilter.cs create mode 100644 src/Microsoft.Graph/Generated/Models/DirectoryDefinition.cs create mode 100644 src/Microsoft.Graph/Generated/Models/DirectoryDefinitionCollectionResponse.cs create mode 100644 src/Microsoft.Graph/Generated/Models/DirectoryDefinitionDiscoverabilities.cs create mode 100644 src/Microsoft.Graph/Generated/Models/ExpressionInputObject.cs create mode 100644 src/Microsoft.Graph/Generated/Models/Filter.cs create mode 100644 src/Microsoft.Graph/Generated/Models/FilterClause.cs create mode 100644 src/Microsoft.Graph/Generated/Models/FilterGroup.cs create mode 100644 src/Microsoft.Graph/Generated/Models/FilterOperand.cs create mode 100644 src/Microsoft.Graph/Generated/Models/FilterOperatorSchema.cs create mode 100644 src/Microsoft.Graph/Generated/Models/FilterOperatorSchemaCollectionResponse.cs create mode 100644 src/Microsoft.Graph/Generated/Models/GroupFilter.cs create mode 100644 src/Microsoft.Graph/Generated/Models/Mutability.cs create mode 100644 src/Microsoft.Graph/Generated/Models/ObjectDefinition.cs create mode 100644 src/Microsoft.Graph/Generated/Models/ObjectDefinitionMetadata.cs create mode 100644 src/Microsoft.Graph/Generated/Models/ObjectDefinitionMetadataEntry.cs create mode 100644 src/Microsoft.Graph/Generated/Models/ObjectFlowTypes.cs create mode 100644 src/Microsoft.Graph/Generated/Models/ObjectMapping.cs create mode 100644 src/Microsoft.Graph/Generated/Models/ObjectMappingMetadata.cs create mode 100644 src/Microsoft.Graph/Generated/Models/ObjectMappingMetadataEntry.cs create mode 100644 src/Microsoft.Graph/Generated/Models/OnlineMeetingContentSharingDisabledReason.cs create mode 100644 src/Microsoft.Graph/Generated/Models/OnlineMeetingRestricted.cs create mode 100644 src/Microsoft.Graph/Generated/Models/OnlineMeetingVideoDisabledReason.cs create mode 100644 src/Microsoft.Graph/Generated/Models/ParseExpressionResponse.cs create mode 100644 src/Microsoft.Graph/Generated/Models/QuarantineReason.cs create mode 100644 src/Microsoft.Graph/Generated/Models/ReferencedObject.cs create mode 100644 src/Microsoft.Graph/Generated/Models/ScopeOperatorMultiValuedComparisonType.cs create mode 100644 src/Microsoft.Graph/Generated/Models/ScopeOperatorType.cs create mode 100644 src/Microsoft.Graph/Generated/Models/StringKeyAttributeMappingSourceValuePair.cs create mode 100644 src/Microsoft.Graph/Generated/Models/StringKeyLongValuePair.cs create mode 100644 src/Microsoft.Graph/Generated/Models/StringKeyObjectValuePair.cs create mode 100644 src/Microsoft.Graph/Generated/Models/StringKeyStringValuePair.cs create mode 100644 src/Microsoft.Graph/Generated/Models/Synchronization.cs create mode 100644 src/Microsoft.Graph/Generated/Models/SynchronizationError.cs create mode 100644 src/Microsoft.Graph/Generated/Models/SynchronizationJob.cs create mode 100644 src/Microsoft.Graph/Generated/Models/SynchronizationJobApplicationParameters.cs create mode 100644 src/Microsoft.Graph/Generated/Models/SynchronizationJobCollectionResponse.cs create mode 100644 src/Microsoft.Graph/Generated/Models/SynchronizationJobRestartCriteria.cs create mode 100644 src/Microsoft.Graph/Generated/Models/SynchronizationJobRestartScope.cs create mode 100644 src/Microsoft.Graph/Generated/Models/SynchronizationJobSubject.cs create mode 100644 src/Microsoft.Graph/Generated/Models/SynchronizationLinkedObjects.cs create mode 100644 src/Microsoft.Graph/Generated/Models/SynchronizationMetadata.cs create mode 100644 src/Microsoft.Graph/Generated/Models/SynchronizationMetadataEntry.cs create mode 100644 src/Microsoft.Graph/Generated/Models/SynchronizationProgress.cs create mode 100644 src/Microsoft.Graph/Generated/Models/SynchronizationQuarantine.cs create mode 100644 src/Microsoft.Graph/Generated/Models/SynchronizationRule.cs create mode 100644 src/Microsoft.Graph/Generated/Models/SynchronizationSchedule.cs create mode 100644 src/Microsoft.Graph/Generated/Models/SynchronizationScheduleState.cs create mode 100644 src/Microsoft.Graph/Generated/Models/SynchronizationSchema.cs create mode 100644 src/Microsoft.Graph/Generated/Models/SynchronizationSecret.cs create mode 100644 src/Microsoft.Graph/Generated/Models/SynchronizationSecretKeyStringValuePair.cs create mode 100644 src/Microsoft.Graph/Generated/Models/SynchronizationStatus.cs create mode 100644 src/Microsoft.Graph/Generated/Models/SynchronizationStatusCode.cs create mode 100644 src/Microsoft.Graph/Generated/Models/SynchronizationTaskExecution.cs create mode 100644 src/Microsoft.Graph/Generated/Models/SynchronizationTaskExecutionResult.cs create mode 100644 src/Microsoft.Graph/Generated/Models/SynchronizationTemplate.cs create mode 100644 src/Microsoft.Graph/Generated/Models/SynchronizationTemplateCollectionResponse.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/AcquireAccessToken/AcquireAccessTokenPostRequestBody.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/AcquireAccessToken/AcquireAccessTokenRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Count/CountRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Pause/PauseRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/ProvisionOnDemand/ProvisionOnDemandPostRequestBody.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/ProvisionOnDemand/ProvisionOnDemandRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Restart/RestartPostRequestBody.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Restart/RestartRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/Directories/Count/CountRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/Directories/DirectoriesRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/Directories/Item/DirectoryDefinitionItemRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/Directories/Item/Discover/DiscoverRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/FilterOperators/FilterOperatorsRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/FilterOperators/FilterOperatorsResponse.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/Functions/FunctionsRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/Functions/FunctionsResponse.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/ParseExpression/ParseExpressionPostRequestBody.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/ParseExpression/ParseExpressionRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/SchemaRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Start/StartRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/SynchronizationJobItemRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/ValidateCredentials/ValidateCredentialsPostRequestBody.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/ValidateCredentials/ValidateCredentialsRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/JobsRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/ValidateCredentials/ValidateCredentialsPostRequestBody.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/ValidateCredentials/ValidateCredentialsRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Secrets/Count/CountRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Secrets/SecretsRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/SynchronizationRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Count/CountRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/Directories/Count/CountRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/Directories/DirectoriesRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/Directories/Item/DirectoryDefinitionItemRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/Directories/Item/Discover/DiscoverRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/FilterOperators/FilterOperatorsRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/FilterOperators/FilterOperatorsResponse.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/Functions/FunctionsRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/Functions/FunctionsResponse.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/ParseExpression/ParseExpressionPostRequestBody.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/ParseExpression/ParseExpressionRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/SchemaRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/SynchronizationTemplateItemRequestBuilder.cs create mode 100644 src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/TemplatesRequestBuilder.cs diff --git a/src/Microsoft.Graph/Generated/Applications/Item/ApplicationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/ApplicationItemRequestBuilder.cs index adbe79c463d..4a75e212cd5 100644 --- a/src/Microsoft.Graph/Generated/Applications/Item/ApplicationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Applications/Item/ApplicationItemRequestBuilder.cs @@ -15,6 +15,7 @@ using Microsoft.Graph.Applications.Item.RemovePassword; using Microsoft.Graph.Applications.Item.Restore; using Microsoft.Graph.Applications.Item.SetVerifiedPublisher; +using Microsoft.Graph.Applications.Item.Synchronization; using Microsoft.Graph.Applications.Item.TokenIssuancePolicies; using Microsoft.Graph.Applications.Item.TokenLifetimePolicies; using Microsoft.Graph.Applications.Item.UnsetVerifiedPublisher; @@ -101,6 +102,10 @@ public class ApplicationItemRequestBuilder : BaseRequestBuilder { public SetVerifiedPublisherRequestBuilder SetVerifiedPublisher { get => new SetVerifiedPublisherRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the synchronization property of the microsoft.graph.application entity. + public SynchronizationRequestBuilder Synchronization { get => + new SynchronizationRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the tokenIssuancePolicies property of the microsoft.graph.application entity. public TokenIssuancePoliciesRequestBuilder TokenIssuancePolicies { get => new TokenIssuancePoliciesRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/AcquireAccessToken/AcquireAccessTokenPostRequestBody.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/AcquireAccessToken/AcquireAccessTokenPostRequestBody.cs new file mode 100644 index 00000000000..94403ca687a --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/AcquireAccessToken/AcquireAccessTokenPostRequestBody.cs @@ -0,0 +1,64 @@ +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.AcquireAccessToken { + public class AcquireAccessTokenPostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The credentials property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Credentials { + get { return BackingStore?.Get?>("credentials"); } + set { BackingStore?.Set("credentials", value); } + } +#nullable restore +#else + public List Credentials { + get { return BackingStore?.Get>("credentials"); } + set { BackingStore?.Set("credentials", value); } + } +#endif + /// + /// Instantiates a new acquireAccessTokenPostRequestBody and sets the default values. + /// + public AcquireAccessTokenPostRequestBody() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static AcquireAccessTokenPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AcquireAccessTokenPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"credentials", n => { Credentials = n.GetCollectionOfObjectValues(SynchronizationSecretKeyStringValuePair.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("credentials", Credentials); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/AcquireAccessToken/AcquireAccessTokenRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/AcquireAccessToken/AcquireAccessTokenRequestBuilder.cs new file mode 100644 index 00000000000..f330df88bf3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/AcquireAccessToken/AcquireAccessTokenRequestBuilder.cs @@ -0,0 +1,94 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.AcquireAccessToken { + /// + /// Provides operations to call the acquireAccessToken method. + /// + public class AcquireAccessTokenRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new AcquireAccessTokenRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AcquireAccessTokenRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/acquireAccessToken", pathParameters) { + } + /// + /// Instantiates a new AcquireAccessTokenRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AcquireAccessTokenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/acquireAccessToken", rawUrl) { + } + /// + /// Invoke action acquireAccessToken + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(AcquireAccessTokenPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(AcquireAccessTokenPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Invoke action acquireAccessToken + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(AcquireAccessTokenPostRequestBody body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(AcquireAccessTokenPostRequestBody body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new AcquireAccessTokenRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AcquireAccessTokenRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new acquireAccessTokenRequestBuilderPostRequestConfiguration and sets the default values. + /// + public AcquireAccessTokenRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..3a6b7f7120b --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Jobs.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/$count{?%24search,%24filter}", pathParameters) { + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Pause/PauseRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Pause/PauseRequestBuilder.cs new file mode 100644 index 00000000000..75677e8b84f --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Pause/PauseRequestBuilder.cs @@ -0,0 +1,89 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Jobs.Item.Pause { + /// + /// Provides operations to call the pause method. + /// + public class PauseRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new PauseRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PauseRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/pause", pathParameters) { + } + /// + /// Instantiates a new PauseRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PauseRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/pause", rawUrl) { + } + /// + /// Invoke action pause + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Invoke action pause + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new PauseRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PauseRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new pauseRequestBuilderPostRequestConfiguration and sets the default values. + /// + public PauseRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/ProvisionOnDemand/ProvisionOnDemandPostRequestBody.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/ProvisionOnDemand/ProvisionOnDemandPostRequestBody.cs new file mode 100644 index 00000000000..3de24c0a68b --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/ProvisionOnDemand/ProvisionOnDemandPostRequestBody.cs @@ -0,0 +1,64 @@ +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Jobs.Item.ProvisionOnDemand { + public class ProvisionOnDemandPostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The parameters property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Parameters { + get { return BackingStore?.Get?>("parameters"); } + set { BackingStore?.Set("parameters", value); } + } +#nullable restore +#else + public List Parameters { + get { return BackingStore?.Get>("parameters"); } + set { BackingStore?.Set("parameters", value); } + } +#endif + /// + /// Instantiates a new provisionOnDemandPostRequestBody and sets the default values. + /// + public ProvisionOnDemandPostRequestBody() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static ProvisionOnDemandPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ProvisionOnDemandPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"parameters", n => { Parameters = n.GetCollectionOfObjectValues(SynchronizationJobApplicationParameters.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("parameters", Parameters); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/ProvisionOnDemand/ProvisionOnDemandRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/ProvisionOnDemand/ProvisionOnDemandRequestBuilder.cs new file mode 100644 index 00000000000..d2686fce519 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/ProvisionOnDemand/ProvisionOnDemandRequestBuilder.cs @@ -0,0 +1,96 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Jobs.Item.ProvisionOnDemand { + /// + /// Provides operations to call the provisionOnDemand method. + /// + public class ProvisionOnDemandRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new ProvisionOnDemandRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ProvisionOnDemandRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/provisionOnDemand", pathParameters) { + } + /// + /// Instantiates a new ProvisionOnDemandRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ProvisionOnDemandRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/provisionOnDemand", rawUrl) { + } + /// + /// Invoke action provisionOnDemand + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(ProvisionOnDemandPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(ProvisionOnDemandPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, StringKeyStringValuePair.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke action provisionOnDemand + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(ProvisionOnDemandPostRequestBody body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(ProvisionOnDemandPostRequestBody body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new ProvisionOnDemandRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ProvisionOnDemandRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new provisionOnDemandRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ProvisionOnDemandRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Restart/RestartPostRequestBody.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Restart/RestartPostRequestBody.cs new file mode 100644 index 00000000000..f4241ad323f --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Restart/RestartPostRequestBody.cs @@ -0,0 +1,64 @@ +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Jobs.Item.Restart { + public class RestartPostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The criteria property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public SynchronizationJobRestartCriteria? Criteria { + get { return BackingStore?.Get("criteria"); } + set { BackingStore?.Set("criteria", value); } + } +#nullable restore +#else + public SynchronizationJobRestartCriteria Criteria { + get { return BackingStore?.Get("criteria"); } + set { BackingStore?.Set("criteria", value); } + } +#endif + /// + /// Instantiates a new restartPostRequestBody and sets the default values. + /// + public RestartPostRequestBody() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static RestartPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new RestartPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"criteria", n => { Criteria = n.GetObjectValue(SynchronizationJobRestartCriteria.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("criteria", Criteria); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Restart/RestartRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Restart/RestartRequestBuilder.cs new file mode 100644 index 00000000000..ebee4f6464c --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Restart/RestartRequestBuilder.cs @@ -0,0 +1,94 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Jobs.Item.Restart { + /// + /// Provides operations to call the restart method. + /// + public class RestartRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new RestartRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RestartRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/restart", pathParameters) { + } + /// + /// Instantiates a new RestartRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RestartRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/restart", rawUrl) { + } + /// + /// Invoke action restart + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(RestartPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(RestartPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Invoke action restart + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(RestartPostRequestBody body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(RestartPostRequestBody body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new RestartRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class RestartRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new restartRequestBuilderPostRequestConfiguration and sets the default values. + /// + public RestartRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Directories/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Directories/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..0eb796dbcee --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Directories/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Jobs.Item.Schema.Directories.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/directories/$count{?%24search,%24filter}", pathParameters) { + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/directories/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Directories/DirectoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Directories/DirectoriesRequestBuilder.cs new file mode 100644 index 00000000000..db84f0be04a --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Directories/DirectoriesRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.Applications.Item.Synchronization.Jobs.Item.Schema.Directories.Count; +using Microsoft.Graph.Applications.Item.Synchronization.Jobs.Item.Schema.Directories.Item; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Jobs.Item.Schema.Directories { + /// + /// Provides operations to manage the directories property of the microsoft.graph.synchronizationSchema entity. + /// + public class DirectoriesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the directories property of the microsoft.graph.synchronizationSchema entity. + public DirectoryDefinitionItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("directoryDefinition%2Did", position); + return new DirectoryDefinitionItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new DirectoriesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DirectoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/directories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new DirectoriesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DirectoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/directories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get directories from applications + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryDefinitionCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to directories for applications + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(DirectoryDefinition body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(DirectoryDefinition body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get directories from applications + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new DirectoriesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to directories for applications + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(DirectoryDefinition body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(DirectoryDefinition body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new DirectoriesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get directories from applications + /// + public class DirectoriesRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DirectoriesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DirectoriesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DirectoriesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new directoriesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DirectoriesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DirectoriesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new directoriesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public DirectoriesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Directories/Item/DirectoryDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Directories/Item/DirectoryDefinitionItemRequestBuilder.cs new file mode 100644 index 00000000000..602960fea6b --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Directories/Item/DirectoryDefinitionItemRequestBuilder.cs @@ -0,0 +1,248 @@ +using Microsoft.Graph.Applications.Item.Synchronization.Jobs.Item.Schema.Directories.Item.Discover; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Jobs.Item.Schema.Directories.Item { + /// + /// Provides operations to manage the directories property of the microsoft.graph.synchronizationSchema entity. + /// + public class DirectoryDefinitionItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to call the discover method. + public DiscoverRequestBuilder Discover { get => + new DiscoverRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new DirectoryDefinitionItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DirectoryDefinitionItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/directories/{directoryDefinition%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new DirectoryDefinitionItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DirectoryDefinitionItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/directories/{directoryDefinition%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property directories for applications + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get directories from applications + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property directories in applications + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(DirectoryDefinition body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(DirectoryDefinition body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property directories for applications + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new DirectoryDefinitionItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get directories from applications + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new DirectoryDefinitionItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property directories in applications + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(DirectoryDefinition body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(DirectoryDefinition body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new DirectoryDefinitionItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DirectoryDefinitionItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new DirectoryDefinitionItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public DirectoryDefinitionItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get directories from applications + /// + public class DirectoryDefinitionItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DirectoryDefinitionItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DirectoryDefinitionItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DirectoryDefinitionItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new DirectoryDefinitionItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DirectoryDefinitionItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DirectoryDefinitionItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new DirectoryDefinitionItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public DirectoryDefinitionItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Directories/Item/Discover/DiscoverRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Directories/Item/Discover/DiscoverRequestBuilder.cs new file mode 100644 index 00000000000..2e874d1edb1 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Directories/Item/Discover/DiscoverRequestBuilder.cs @@ -0,0 +1,91 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Jobs.Item.Schema.Directories.Item.Discover { + /// + /// Provides operations to call the discover method. + /// + public class DiscoverRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new DiscoverRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DiscoverRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/directories/{directoryDefinition%2Did}/discover", pathParameters) { + } + /// + /// Instantiates a new DiscoverRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DiscoverRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/directories/{directoryDefinition%2Did}/discover", rawUrl) { + } + /// + /// Invoke action discover + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke action discover + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new DiscoverRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DiscoverRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new discoverRequestBuilderPostRequestConfiguration and sets the default values. + /// + public DiscoverRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/FilterOperators/FilterOperatorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/FilterOperators/FilterOperatorsRequestBuilder.cs new file mode 100644 index 00000000000..4ae1d795631 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/FilterOperators/FilterOperatorsRequestBuilder.cs @@ -0,0 +1,147 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Jobs.Item.Schema.FilterOperators { + /// + /// Provides operations to call the filterOperators method. + /// + public class FilterOperatorsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new FilterOperatorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FilterOperatorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/filterOperators(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", pathParameters) { + } + /// + /// Instantiates a new FilterOperatorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FilterOperatorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/filterOperators(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", rawUrl) { + } + /// + /// Invoke function filterOperators + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, FilterOperatorsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke function filterOperators + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new FilterOperatorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Invoke function filterOperators + /// + public class FilterOperatorsRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FilterOperatorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public FilterOperatorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new FilterOperatorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new filterOperatorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public FilterOperatorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/FilterOperators/FilterOperatorsResponse.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/FilterOperators/FilterOperatorsResponse.cs new file mode 100644 index 00000000000..b60c04078ed --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/FilterOperators/FilterOperatorsResponse.cs @@ -0,0 +1,49 @@ +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Jobs.Item.Schema.FilterOperators { + public class FilterOperatorsResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static new FilterOperatorsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new FilterOperatorsResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(FilterOperatorSchema.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Functions/FunctionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Functions/FunctionsRequestBuilder.cs new file mode 100644 index 00000000000..0f1e052dd4d --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Functions/FunctionsRequestBuilder.cs @@ -0,0 +1,147 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Jobs.Item.Schema.Functions { + /// + /// Provides operations to call the functions method. + /// + public class FunctionsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new FunctionsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FunctionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/functions(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", pathParameters) { + } + /// + /// Instantiates a new FunctionsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FunctionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/functions(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", rawUrl) { + } + /// + /// Invoke function functions + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, FunctionsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke function functions + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new FunctionsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Invoke function functions + /// + public class FunctionsRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FunctionsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public FunctionsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new FunctionsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new functionsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public FunctionsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Functions/FunctionsResponse.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Functions/FunctionsResponse.cs new file mode 100644 index 00000000000..2508373b978 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/Functions/FunctionsResponse.cs @@ -0,0 +1,49 @@ +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Jobs.Item.Schema.Functions { + public class FunctionsResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static new FunctionsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new FunctionsResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(AttributeMappingFunctionSchema.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/ParseExpression/ParseExpressionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/ParseExpression/ParseExpressionPostRequestBody.cs new file mode 100644 index 00000000000..18af428eb1b --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/ParseExpression/ParseExpressionPostRequestBody.cs @@ -0,0 +1,96 @@ +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Jobs.Item.Schema.ParseExpression { + public class ParseExpressionPostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The expression property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Expression { + get { return BackingStore?.Get("expression"); } + set { BackingStore?.Set("expression", value); } + } +#nullable restore +#else + public string Expression { + get { return BackingStore?.Get("expression"); } + set { BackingStore?.Set("expression", value); } + } +#endif + /// The targetAttributeDefinition property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public AttributeDefinition? TargetAttributeDefinition { + get { return BackingStore?.Get("targetAttributeDefinition"); } + set { BackingStore?.Set("targetAttributeDefinition", value); } + } +#nullable restore +#else + public AttributeDefinition TargetAttributeDefinition { + get { return BackingStore?.Get("targetAttributeDefinition"); } + set { BackingStore?.Set("targetAttributeDefinition", value); } + } +#endif + /// The testInputObject property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public ExpressionInputObject? TestInputObject { + get { return BackingStore?.Get("testInputObject"); } + set { BackingStore?.Set("testInputObject", value); } + } +#nullable restore +#else + public ExpressionInputObject TestInputObject { + get { return BackingStore?.Get("testInputObject"); } + set { BackingStore?.Set("testInputObject", value); } + } +#endif + /// + /// Instantiates a new parseExpressionPostRequestBody and sets the default values. + /// + public ParseExpressionPostRequestBody() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static ParseExpressionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ParseExpressionPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"expression", n => { Expression = n.GetStringValue(); } }, + {"targetAttributeDefinition", n => { TargetAttributeDefinition = n.GetObjectValue(AttributeDefinition.CreateFromDiscriminatorValue); } }, + {"testInputObject", n => { TestInputObject = n.GetObjectValue(ExpressionInputObject.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("expression", Expression); + writer.WriteObjectValue("targetAttributeDefinition", TargetAttributeDefinition); + writer.WriteObjectValue("testInputObject", TestInputObject); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/ParseExpression/ParseExpressionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/ParseExpression/ParseExpressionRequestBuilder.cs new file mode 100644 index 00000000000..826762fe99d --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/ParseExpression/ParseExpressionRequestBuilder.cs @@ -0,0 +1,96 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Jobs.Item.Schema.ParseExpression { + /// + /// Provides operations to call the parseExpression method. + /// + public class ParseExpressionRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new ParseExpressionRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ParseExpressionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/parseExpression", pathParameters) { + } + /// + /// Instantiates a new ParseExpressionRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ParseExpressionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/parseExpression", rawUrl) { + } + /// + /// Invoke action parseExpression + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(ParseExpressionPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(ParseExpressionPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, ParseExpressionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke action parseExpression + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(ParseExpressionPostRequestBody body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(ParseExpressionPostRequestBody body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new ParseExpressionRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ParseExpressionRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new parseExpressionRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ParseExpressionRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/SchemaRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/SchemaRequestBuilder.cs new file mode 100644 index 00000000000..45018807e2b --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Schema/SchemaRequestBuilder.cs @@ -0,0 +1,263 @@ +using Microsoft.Graph.Applications.Item.Synchronization.Jobs.Item.Schema.Directories; +using Microsoft.Graph.Applications.Item.Synchronization.Jobs.Item.Schema.FilterOperators; +using Microsoft.Graph.Applications.Item.Synchronization.Jobs.Item.Schema.Functions; +using Microsoft.Graph.Applications.Item.Synchronization.Jobs.Item.Schema.ParseExpression; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Jobs.Item.Schema { + /// + /// Provides operations to manage the schema property of the microsoft.graph.synchronizationJob entity. + /// + public class SchemaRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the directories property of the microsoft.graph.synchronizationSchema entity. + public DirectoriesRequestBuilder Directories { get => + new DirectoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the filterOperators method. + public FilterOperatorsRequestBuilder FilterOperators { get => + new FilterOperatorsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the functions method. + public FunctionsRequestBuilder Functions { get => + new FunctionsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the parseExpression method. + public ParseExpressionRequestBuilder ParseExpression { get => + new ParseExpressionRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new SchemaRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SchemaRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new SchemaRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SchemaRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property schema for applications + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get schema from applications + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, SynchronizationSchema.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property schema in applications + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(SynchronizationSchema body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(SynchronizationSchema body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, SynchronizationSchema.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property schema for applications + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new SchemaRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get schema from applications + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new SchemaRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property schema in applications + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(SynchronizationSchema body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(SynchronizationSchema body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new SchemaRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SchemaRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new schemaRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public SchemaRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get schema from applications + /// + public class SchemaRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SchemaRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public SchemaRequestBuilderGetQueryParameters QueryParameters { get; set; } = new SchemaRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new schemaRequestBuilderGetRequestConfiguration and sets the default values. + /// + public SchemaRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SchemaRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new schemaRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public SchemaRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Start/StartRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Start/StartRequestBuilder.cs new file mode 100644 index 00000000000..3c00f88874a --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/Start/StartRequestBuilder.cs @@ -0,0 +1,89 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Jobs.Item.Start { + /// + /// Provides operations to call the start method. + /// + public class StartRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new StartRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public StartRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/start", pathParameters) { + } + /// + /// Instantiates a new StartRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public StartRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/start", rawUrl) { + } + /// + /// Invoke action start + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Invoke action start + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new StartRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class StartRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new startRequestBuilderPostRequestConfiguration and sets the default values. + /// + public StartRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/SynchronizationJobItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/SynchronizationJobItemRequestBuilder.cs new file mode 100644 index 00000000000..641c17db4d2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/SynchronizationJobItemRequestBuilder.cs @@ -0,0 +1,273 @@ +using Microsoft.Graph.Applications.Item.Synchronization.Jobs.Item.Pause; +using Microsoft.Graph.Applications.Item.Synchronization.Jobs.Item.ProvisionOnDemand; +using Microsoft.Graph.Applications.Item.Synchronization.Jobs.Item.Restart; +using Microsoft.Graph.Applications.Item.Synchronization.Jobs.Item.Schema; +using Microsoft.Graph.Applications.Item.Synchronization.Jobs.Item.Start; +using Microsoft.Graph.Applications.Item.Synchronization.Jobs.Item.ValidateCredentials; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Jobs.Item { + /// + /// Provides operations to manage the jobs property of the microsoft.graph.synchronization entity. + /// + public class SynchronizationJobItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to call the pause method. + public PauseRequestBuilder Pause { get => + new PauseRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the provisionOnDemand method. + public ProvisionOnDemandRequestBuilder ProvisionOnDemand { get => + new ProvisionOnDemandRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the restart method. + public RestartRequestBuilder Restart { get => + new RestartRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the schema property of the microsoft.graph.synchronizationJob entity. + public SchemaRequestBuilder Schema { get => + new SchemaRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the start method. + public StartRequestBuilder Start { get => + new StartRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the validateCredentials method. + public ValidateCredentialsRequestBuilder ValidateCredentials { get => + new ValidateCredentialsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new SynchronizationJobItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SynchronizationJobItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new SynchronizationJobItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SynchronizationJobItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property jobs for applications + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get jobs from applications + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, SynchronizationJob.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property jobs in applications + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(SynchronizationJob body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(SynchronizationJob body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, SynchronizationJob.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property jobs for applications + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new SynchronizationJobItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get jobs from applications + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new SynchronizationJobItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property jobs in applications + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(SynchronizationJob body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(SynchronizationJob body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new SynchronizationJobItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SynchronizationJobItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new SynchronizationJobItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public SynchronizationJobItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get jobs from applications + /// + public class SynchronizationJobItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SynchronizationJobItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public SynchronizationJobItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new SynchronizationJobItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new SynchronizationJobItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public SynchronizationJobItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SynchronizationJobItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new SynchronizationJobItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public SynchronizationJobItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/ValidateCredentials/ValidateCredentialsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/ValidateCredentials/ValidateCredentialsPostRequestBody.cs new file mode 100644 index 00000000000..f06d4223d62 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/ValidateCredentials/ValidateCredentialsPostRequestBody.cs @@ -0,0 +1,103 @@ +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Jobs.Item.ValidateCredentials { + public class ValidateCredentialsPostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// The applicationIdentifier property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ApplicationIdentifier { + get { return BackingStore?.Get("applicationIdentifier"); } + set { BackingStore?.Set("applicationIdentifier", value); } + } +#nullable restore +#else + public string ApplicationIdentifier { + get { return BackingStore?.Get("applicationIdentifier"); } + set { BackingStore?.Set("applicationIdentifier", value); } + } +#endif + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The credentials property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Credentials { + get { return BackingStore?.Get?>("credentials"); } + set { BackingStore?.Set("credentials", value); } + } +#nullable restore +#else + public List Credentials { + get { return BackingStore?.Get>("credentials"); } + set { BackingStore?.Set("credentials", value); } + } +#endif + /// The templateId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TemplateId { + get { return BackingStore?.Get("templateId"); } + set { BackingStore?.Set("templateId", value); } + } +#nullable restore +#else + public string TemplateId { + get { return BackingStore?.Get("templateId"); } + set { BackingStore?.Set("templateId", value); } + } +#endif + /// The useSavedCredentials property + public bool? UseSavedCredentials { + get { return BackingStore?.Get("useSavedCredentials"); } + set { BackingStore?.Set("useSavedCredentials", value); } + } + /// + /// Instantiates a new validateCredentialsPostRequestBody and sets the default values. + /// + public ValidateCredentialsPostRequestBody() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static ValidateCredentialsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ValidateCredentialsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"applicationIdentifier", n => { ApplicationIdentifier = n.GetStringValue(); } }, + {"credentials", n => { Credentials = n.GetCollectionOfObjectValues(SynchronizationSecretKeyStringValuePair.CreateFromDiscriminatorValue)?.ToList(); } }, + {"templateId", n => { TemplateId = n.GetStringValue(); } }, + {"useSavedCredentials", n => { UseSavedCredentials = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("applicationIdentifier", ApplicationIdentifier); + writer.WriteCollectionOfObjectValues("credentials", Credentials); + writer.WriteStringValue("templateId", TemplateId); + writer.WriteBoolValue("useSavedCredentials", UseSavedCredentials); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/ValidateCredentials/ValidateCredentialsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/ValidateCredentials/ValidateCredentialsRequestBuilder.cs new file mode 100644 index 00000000000..c1084a7bbc9 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/Item/ValidateCredentials/ValidateCredentialsRequestBuilder.cs @@ -0,0 +1,94 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Jobs.Item.ValidateCredentials { + /// + /// Provides operations to call the validateCredentials method. + /// + public class ValidateCredentialsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new ValidateCredentialsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ValidateCredentialsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/validateCredentials", pathParameters) { + } + /// + /// Instantiates a new ValidateCredentialsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ValidateCredentialsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/{synchronizationJob%2Did}/validateCredentials", rawUrl) { + } + /// + /// Invoke action validateCredentials + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(ValidateCredentialsPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(ValidateCredentialsPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Invoke action validateCredentials + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(ValidateCredentialsPostRequestBody body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(ValidateCredentialsPostRequestBody body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new ValidateCredentialsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ValidateCredentialsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new validateCredentialsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ValidateCredentialsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/JobsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/JobsRequestBuilder.cs new file mode 100644 index 00000000000..201077e95e9 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/JobsRequestBuilder.cs @@ -0,0 +1,240 @@ +using Microsoft.Graph.Applications.Item.Synchronization.Jobs.Count; +using Microsoft.Graph.Applications.Item.Synchronization.Jobs.Item; +using Microsoft.Graph.Applications.Item.Synchronization.Jobs.ValidateCredentials; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Jobs { + /// + /// Provides operations to manage the jobs property of the microsoft.graph.synchronization entity. + /// + public class JobsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the validateCredentials method. + public ValidateCredentialsRequestBuilder ValidateCredentials { get => + new ValidateCredentialsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the jobs property of the microsoft.graph.synchronization entity. + public SynchronizationJobItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("synchronizationJob%2Did", position); + return new SynchronizationJobItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new JobsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public JobsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new JobsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public JobsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get jobs from applications + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, SynchronizationJobCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to jobs for applications + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(SynchronizationJob body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(SynchronizationJob body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, SynchronizationJob.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get jobs from applications + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new JobsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to jobs for applications + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(SynchronizationJob body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(SynchronizationJob body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new JobsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get jobs from applications + /// + public class JobsRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class JobsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public JobsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new JobsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new jobsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public JobsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class JobsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new jobsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public JobsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/ValidateCredentials/ValidateCredentialsPostRequestBody.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/ValidateCredentials/ValidateCredentialsPostRequestBody.cs new file mode 100644 index 00000000000..3fde228b3c2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/ValidateCredentials/ValidateCredentialsPostRequestBody.cs @@ -0,0 +1,103 @@ +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Jobs.ValidateCredentials { + public class ValidateCredentialsPostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// The applicationIdentifier property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ApplicationIdentifier { + get { return BackingStore?.Get("applicationIdentifier"); } + set { BackingStore?.Set("applicationIdentifier", value); } + } +#nullable restore +#else + public string ApplicationIdentifier { + get { return BackingStore?.Get("applicationIdentifier"); } + set { BackingStore?.Set("applicationIdentifier", value); } + } +#endif + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The credentials property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Credentials { + get { return BackingStore?.Get?>("credentials"); } + set { BackingStore?.Set("credentials", value); } + } +#nullable restore +#else + public List Credentials { + get { return BackingStore?.Get>("credentials"); } + set { BackingStore?.Set("credentials", value); } + } +#endif + /// The templateId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TemplateId { + get { return BackingStore?.Get("templateId"); } + set { BackingStore?.Set("templateId", value); } + } +#nullable restore +#else + public string TemplateId { + get { return BackingStore?.Get("templateId"); } + set { BackingStore?.Set("templateId", value); } + } +#endif + /// The useSavedCredentials property + public bool? UseSavedCredentials { + get { return BackingStore?.Get("useSavedCredentials"); } + set { BackingStore?.Set("useSavedCredentials", value); } + } + /// + /// Instantiates a new validateCredentialsPostRequestBody and sets the default values. + /// + public ValidateCredentialsPostRequestBody() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static ValidateCredentialsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ValidateCredentialsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"applicationIdentifier", n => { ApplicationIdentifier = n.GetStringValue(); } }, + {"credentials", n => { Credentials = n.GetCollectionOfObjectValues(SynchronizationSecretKeyStringValuePair.CreateFromDiscriminatorValue)?.ToList(); } }, + {"templateId", n => { TemplateId = n.GetStringValue(); } }, + {"useSavedCredentials", n => { UseSavedCredentials = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("applicationIdentifier", ApplicationIdentifier); + writer.WriteCollectionOfObjectValues("credentials", Credentials); + writer.WriteStringValue("templateId", TemplateId); + writer.WriteBoolValue("useSavedCredentials", UseSavedCredentials); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/ValidateCredentials/ValidateCredentialsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/ValidateCredentials/ValidateCredentialsRequestBuilder.cs new file mode 100644 index 00000000000..55184145dd2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Jobs/ValidateCredentials/ValidateCredentialsRequestBuilder.cs @@ -0,0 +1,94 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Jobs.ValidateCredentials { + /// + /// Provides operations to call the validateCredentials method. + /// + public class ValidateCredentialsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new ValidateCredentialsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ValidateCredentialsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/validateCredentials", pathParameters) { + } + /// + /// Instantiates a new ValidateCredentialsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ValidateCredentialsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/jobs/validateCredentials", rawUrl) { + } + /// + /// Invoke action validateCredentials + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(ValidateCredentialsPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(ValidateCredentialsPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Invoke action validateCredentials + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(ValidateCredentialsPostRequestBody body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(ValidateCredentialsPostRequestBody body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new ValidateCredentialsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ValidateCredentialsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new validateCredentialsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ValidateCredentialsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Secrets/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Secrets/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..0498c648f7b --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Secrets/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Secrets.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/secrets/$count{?%24search,%24filter}", pathParameters) { + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/secrets/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Secrets/SecretsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Secrets/SecretsRequestBuilder.cs new file mode 100644 index 00000000000..f48bf4be569 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Secrets/SecretsRequestBuilder.cs @@ -0,0 +1,102 @@ +using Microsoft.Graph.Applications.Item.Synchronization.Secrets.Count; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Secrets { + /// + /// Builds and executes requests for operations under \applications\{application-id}\synchronization\secrets + /// + public class SecretsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new SecretsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SecretsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/secrets", pathParameters) { + } + /// + /// Instantiates a new SecretsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SecretsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/secrets", rawUrl) { + } + /// + /// Update property secrets value. + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> PutAsync(List body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> PutAsync(List body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, SynchronizationSecretKeyStringValuePair.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + return collectionResult?.ToList(); + } + /// + /// Update property secrets value. + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(List body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(List body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PUT, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new SecretsRequestBuilderPutRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SecretsRequestBuilderPutRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new secretsRequestBuilderPutRequestConfiguration and sets the default values. + /// + public SecretsRequestBuilderPutRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/SynchronizationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/SynchronizationRequestBuilder.cs new file mode 100644 index 00000000000..ae934353a35 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/SynchronizationRequestBuilder.cs @@ -0,0 +1,263 @@ +using Microsoft.Graph.Applications.Item.Synchronization.AcquireAccessToken; +using Microsoft.Graph.Applications.Item.Synchronization.Jobs; +using Microsoft.Graph.Applications.Item.Synchronization.Secrets; +using Microsoft.Graph.Applications.Item.Synchronization.Templates; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization { + /// + /// Provides operations to manage the synchronization property of the microsoft.graph.application entity. + /// + public class SynchronizationRequestBuilder : BaseRequestBuilder { + /// Provides operations to call the acquireAccessToken method. + public AcquireAccessTokenRequestBuilder AcquireAccessToken { get => + new AcquireAccessTokenRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the jobs property of the microsoft.graph.synchronization entity. + public JobsRequestBuilder Jobs { get => + new JobsRequestBuilder(PathParameters, RequestAdapter); + } + /// The secrets property + public SecretsRequestBuilder Secrets { get => + new SecretsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the templates property of the microsoft.graph.synchronization entity. + public TemplatesRequestBuilder Templates { get => + new TemplatesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new SynchronizationRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SynchronizationRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new SynchronizationRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SynchronizationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property synchronization for applications + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get synchronization from applications + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.Synchronization.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property synchronization in applications + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Microsoft.Graph.Models.Synchronization body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(Microsoft.Graph.Models.Synchronization body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.Synchronization.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property synchronization for applications + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new SynchronizationRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get synchronization from applications + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new SynchronizationRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property synchronization in applications + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Microsoft.Graph.Models.Synchronization body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Microsoft.Graph.Models.Synchronization body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PUT, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new SynchronizationRequestBuilderPutRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SynchronizationRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new synchronizationRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public SynchronizationRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get synchronization from applications + /// + public class SynchronizationRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SynchronizationRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public SynchronizationRequestBuilderGetQueryParameters QueryParameters { get; set; } = new SynchronizationRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new synchronizationRequestBuilderGetRequestConfiguration and sets the default values. + /// + public SynchronizationRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SynchronizationRequestBuilderPutRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new synchronizationRequestBuilderPutRequestConfiguration and sets the default values. + /// + public SynchronizationRequestBuilderPutRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..eac15281b9f --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Templates.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/$count{?%24search,%24filter}", pathParameters) { + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Directories/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Directories/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..75c584d1b9b --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Directories/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Templates.Item.Schema.Directories.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/directories/$count{?%24search,%24filter}", pathParameters) { + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/directories/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Directories/DirectoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Directories/DirectoriesRequestBuilder.cs new file mode 100644 index 00000000000..83b1b6958b7 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Directories/DirectoriesRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.Applications.Item.Synchronization.Templates.Item.Schema.Directories.Count; +using Microsoft.Graph.Applications.Item.Synchronization.Templates.Item.Schema.Directories.Item; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Templates.Item.Schema.Directories { + /// + /// Provides operations to manage the directories property of the microsoft.graph.synchronizationSchema entity. + /// + public class DirectoriesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the directories property of the microsoft.graph.synchronizationSchema entity. + public DirectoryDefinitionItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("directoryDefinition%2Did", position); + return new DirectoryDefinitionItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new DirectoriesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DirectoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/directories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new DirectoriesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DirectoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/directories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get directories from applications + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryDefinitionCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to directories for applications + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(DirectoryDefinition body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(DirectoryDefinition body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get directories from applications + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new DirectoriesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to directories for applications + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(DirectoryDefinition body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(DirectoryDefinition body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new DirectoriesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get directories from applications + /// + public class DirectoriesRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DirectoriesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DirectoriesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DirectoriesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new directoriesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DirectoriesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DirectoriesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new directoriesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public DirectoriesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Directories/Item/DirectoryDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Directories/Item/DirectoryDefinitionItemRequestBuilder.cs new file mode 100644 index 00000000000..30bd3327cd3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Directories/Item/DirectoryDefinitionItemRequestBuilder.cs @@ -0,0 +1,248 @@ +using Microsoft.Graph.Applications.Item.Synchronization.Templates.Item.Schema.Directories.Item.Discover; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Templates.Item.Schema.Directories.Item { + /// + /// Provides operations to manage the directories property of the microsoft.graph.synchronizationSchema entity. + /// + public class DirectoryDefinitionItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to call the discover method. + public DiscoverRequestBuilder Discover { get => + new DiscoverRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new DirectoryDefinitionItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DirectoryDefinitionItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/directories/{directoryDefinition%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new DirectoryDefinitionItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DirectoryDefinitionItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/directories/{directoryDefinition%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property directories for applications + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get directories from applications + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property directories in applications + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(DirectoryDefinition body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(DirectoryDefinition body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property directories for applications + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new DirectoryDefinitionItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get directories from applications + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new DirectoryDefinitionItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property directories in applications + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(DirectoryDefinition body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(DirectoryDefinition body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new DirectoryDefinitionItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DirectoryDefinitionItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new DirectoryDefinitionItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public DirectoryDefinitionItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get directories from applications + /// + public class DirectoryDefinitionItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DirectoryDefinitionItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DirectoryDefinitionItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DirectoryDefinitionItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new DirectoryDefinitionItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DirectoryDefinitionItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DirectoryDefinitionItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new DirectoryDefinitionItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public DirectoryDefinitionItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Directories/Item/Discover/DiscoverRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Directories/Item/Discover/DiscoverRequestBuilder.cs new file mode 100644 index 00000000000..05345a7d296 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Directories/Item/Discover/DiscoverRequestBuilder.cs @@ -0,0 +1,91 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Templates.Item.Schema.Directories.Item.Discover { + /// + /// Provides operations to call the discover method. + /// + public class DiscoverRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new DiscoverRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DiscoverRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/directories/{directoryDefinition%2Did}/discover", pathParameters) { + } + /// + /// Instantiates a new DiscoverRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DiscoverRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/directories/{directoryDefinition%2Did}/discover", rawUrl) { + } + /// + /// Invoke action discover + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke action discover + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new DiscoverRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DiscoverRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new discoverRequestBuilderPostRequestConfiguration and sets the default values. + /// + public DiscoverRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/FilterOperators/FilterOperatorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/FilterOperators/FilterOperatorsRequestBuilder.cs new file mode 100644 index 00000000000..dc90f1cd345 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/FilterOperators/FilterOperatorsRequestBuilder.cs @@ -0,0 +1,147 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Templates.Item.Schema.FilterOperators { + /// + /// Provides operations to call the filterOperators method. + /// + public class FilterOperatorsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new FilterOperatorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FilterOperatorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/filterOperators(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", pathParameters) { + } + /// + /// Instantiates a new FilterOperatorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FilterOperatorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/filterOperators(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", rawUrl) { + } + /// + /// Invoke function filterOperators + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, FilterOperatorsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke function filterOperators + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new FilterOperatorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Invoke function filterOperators + /// + public class FilterOperatorsRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FilterOperatorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public FilterOperatorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new FilterOperatorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new filterOperatorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public FilterOperatorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/FilterOperators/FilterOperatorsResponse.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/FilterOperators/FilterOperatorsResponse.cs new file mode 100644 index 00000000000..b9764708093 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/FilterOperators/FilterOperatorsResponse.cs @@ -0,0 +1,49 @@ +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Templates.Item.Schema.FilterOperators { + public class FilterOperatorsResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static new FilterOperatorsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new FilterOperatorsResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(FilterOperatorSchema.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Functions/FunctionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Functions/FunctionsRequestBuilder.cs new file mode 100644 index 00000000000..e18738cc365 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Functions/FunctionsRequestBuilder.cs @@ -0,0 +1,147 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Templates.Item.Schema.Functions { + /// + /// Provides operations to call the functions method. + /// + public class FunctionsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new FunctionsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FunctionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/functions(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", pathParameters) { + } + /// + /// Instantiates a new FunctionsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FunctionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/functions(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", rawUrl) { + } + /// + /// Invoke function functions + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, FunctionsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke function functions + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new FunctionsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Invoke function functions + /// + public class FunctionsRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FunctionsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public FunctionsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new FunctionsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new functionsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public FunctionsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Functions/FunctionsResponse.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Functions/FunctionsResponse.cs new file mode 100644 index 00000000000..ae8a149fbfc --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/Functions/FunctionsResponse.cs @@ -0,0 +1,49 @@ +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Templates.Item.Schema.Functions { + public class FunctionsResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static new FunctionsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new FunctionsResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(AttributeMappingFunctionSchema.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/ParseExpression/ParseExpressionPostRequestBody.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/ParseExpression/ParseExpressionPostRequestBody.cs new file mode 100644 index 00000000000..9d069264369 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/ParseExpression/ParseExpressionPostRequestBody.cs @@ -0,0 +1,96 @@ +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Templates.Item.Schema.ParseExpression { + public class ParseExpressionPostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The expression property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Expression { + get { return BackingStore?.Get("expression"); } + set { BackingStore?.Set("expression", value); } + } +#nullable restore +#else + public string Expression { + get { return BackingStore?.Get("expression"); } + set { BackingStore?.Set("expression", value); } + } +#endif + /// The targetAttributeDefinition property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public AttributeDefinition? TargetAttributeDefinition { + get { return BackingStore?.Get("targetAttributeDefinition"); } + set { BackingStore?.Set("targetAttributeDefinition", value); } + } +#nullable restore +#else + public AttributeDefinition TargetAttributeDefinition { + get { return BackingStore?.Get("targetAttributeDefinition"); } + set { BackingStore?.Set("targetAttributeDefinition", value); } + } +#endif + /// The testInputObject property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public ExpressionInputObject? TestInputObject { + get { return BackingStore?.Get("testInputObject"); } + set { BackingStore?.Set("testInputObject", value); } + } +#nullable restore +#else + public ExpressionInputObject TestInputObject { + get { return BackingStore?.Get("testInputObject"); } + set { BackingStore?.Set("testInputObject", value); } + } +#endif + /// + /// Instantiates a new parseExpressionPostRequestBody and sets the default values. + /// + public ParseExpressionPostRequestBody() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static ParseExpressionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ParseExpressionPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"expression", n => { Expression = n.GetStringValue(); } }, + {"targetAttributeDefinition", n => { TargetAttributeDefinition = n.GetObjectValue(AttributeDefinition.CreateFromDiscriminatorValue); } }, + {"testInputObject", n => { TestInputObject = n.GetObjectValue(ExpressionInputObject.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("expression", Expression); + writer.WriteObjectValue("targetAttributeDefinition", TargetAttributeDefinition); + writer.WriteObjectValue("testInputObject", TestInputObject); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/ParseExpression/ParseExpressionRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/ParseExpression/ParseExpressionRequestBuilder.cs new file mode 100644 index 00000000000..ad55e349c3e --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/ParseExpression/ParseExpressionRequestBuilder.cs @@ -0,0 +1,96 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Templates.Item.Schema.ParseExpression { + /// + /// Provides operations to call the parseExpression method. + /// + public class ParseExpressionRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new ParseExpressionRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ParseExpressionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/parseExpression", pathParameters) { + } + /// + /// Instantiates a new ParseExpressionRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ParseExpressionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/parseExpression", rawUrl) { + } + /// + /// Invoke action parseExpression + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(ParseExpressionPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(ParseExpressionPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, ParseExpressionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke action parseExpression + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(ParseExpressionPostRequestBody body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(ParseExpressionPostRequestBody body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new ParseExpressionRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ParseExpressionRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new parseExpressionRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ParseExpressionRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/SchemaRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/SchemaRequestBuilder.cs new file mode 100644 index 00000000000..6a3f834d7bb --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/Schema/SchemaRequestBuilder.cs @@ -0,0 +1,263 @@ +using Microsoft.Graph.Applications.Item.Synchronization.Templates.Item.Schema.Directories; +using Microsoft.Graph.Applications.Item.Synchronization.Templates.Item.Schema.FilterOperators; +using Microsoft.Graph.Applications.Item.Synchronization.Templates.Item.Schema.Functions; +using Microsoft.Graph.Applications.Item.Synchronization.Templates.Item.Schema.ParseExpression; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Templates.Item.Schema { + /// + /// Provides operations to manage the schema property of the microsoft.graph.synchronizationTemplate entity. + /// + public class SchemaRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the directories property of the microsoft.graph.synchronizationSchema entity. + public DirectoriesRequestBuilder Directories { get => + new DirectoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the filterOperators method. + public FilterOperatorsRequestBuilder FilterOperators { get => + new FilterOperatorsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the functions method. + public FunctionsRequestBuilder Functions { get => + new FunctionsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the parseExpression method. + public ParseExpressionRequestBuilder ParseExpression { get => + new ParseExpressionRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new SchemaRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SchemaRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new SchemaRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SchemaRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property schema for applications + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get schema from applications + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, SynchronizationSchema.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property schema in applications + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(SynchronizationSchema body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(SynchronizationSchema body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, SynchronizationSchema.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property schema for applications + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new SchemaRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get schema from applications + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new SchemaRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property schema in applications + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(SynchronizationSchema body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(SynchronizationSchema body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new SchemaRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SchemaRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new schemaRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public SchemaRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get schema from applications + /// + public class SchemaRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SchemaRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public SchemaRequestBuilderGetQueryParameters QueryParameters { get; set; } = new SchemaRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new schemaRequestBuilderGetRequestConfiguration and sets the default values. + /// + public SchemaRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SchemaRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new schemaRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public SchemaRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/SynchronizationTemplateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/SynchronizationTemplateItemRequestBuilder.cs new file mode 100644 index 00000000000..dacd4122fbd --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/Item/SynchronizationTemplateItemRequestBuilder.cs @@ -0,0 +1,248 @@ +using Microsoft.Graph.Applications.Item.Synchronization.Templates.Item.Schema; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Templates.Item { + /// + /// Provides operations to manage the templates property of the microsoft.graph.synchronization entity. + /// + public class SynchronizationTemplateItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the schema property of the microsoft.graph.synchronizationTemplate entity. + public SchemaRequestBuilder Schema { get => + new SchemaRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new SynchronizationTemplateItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SynchronizationTemplateItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new SynchronizationTemplateItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SynchronizationTemplateItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates/{synchronizationTemplate%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property templates for applications + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get templates from applications + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, SynchronizationTemplate.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property templates in applications + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(SynchronizationTemplate body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(SynchronizationTemplate body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, SynchronizationTemplate.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property templates for applications + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new SynchronizationTemplateItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get templates from applications + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new SynchronizationTemplateItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property templates in applications + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(SynchronizationTemplate body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(SynchronizationTemplate body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new SynchronizationTemplateItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SynchronizationTemplateItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new SynchronizationTemplateItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public SynchronizationTemplateItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get templates from applications + /// + public class SynchronizationTemplateItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SynchronizationTemplateItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public SynchronizationTemplateItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new SynchronizationTemplateItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new SynchronizationTemplateItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public SynchronizationTemplateItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SynchronizationTemplateItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new SynchronizationTemplateItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public SynchronizationTemplateItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/TemplatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/TemplatesRequestBuilder.cs new file mode 100644 index 00000000000..9a11ead5b61 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Applications/Item/Synchronization/Templates/TemplatesRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.Applications.Item.Synchronization.Templates.Count; +using Microsoft.Graph.Applications.Item.Synchronization.Templates.Item; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Applications.Item.Synchronization.Templates { + /// + /// Provides operations to manage the templates property of the microsoft.graph.synchronization entity. + /// + public class TemplatesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the templates property of the microsoft.graph.synchronization entity. + public SynchronizationTemplateItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("synchronizationTemplate%2Did", position); + return new SynchronizationTemplateItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new TemplatesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TemplatesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new TemplatesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TemplatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/applications/{application%2Did}/synchronization/templates{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get templates from applications + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, SynchronizationTemplateCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to templates for applications + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(SynchronizationTemplate body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(SynchronizationTemplate body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, SynchronizationTemplate.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get templates from applications + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new TemplatesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to templates for applications + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(SynchronizationTemplate body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(SynchronizationTemplate body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new TemplatesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get templates from applications + /// + public class TemplatesRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TemplatesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public TemplatesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new TemplatesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new templatesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public TemplatesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TemplatesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new templatesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public TemplatesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/BaseGraphServiceClient.cs b/src/Microsoft.Graph/Generated/BaseGraphServiceClient.cs index 0a81ded6eb3..db846542c85 100644 --- a/src/Microsoft.Graph/Generated/BaseGraphServiceClient.cs +++ b/src/Microsoft.Graph/Generated/BaseGraphServiceClient.cs @@ -29,6 +29,8 @@ using Microsoft.Graph.Education; using Microsoft.Graph.EmployeeExperience; using Microsoft.Graph.External; +using Microsoft.Graph.FilterOperators; +using Microsoft.Graph.Functions; using Microsoft.Graph.GroupLifecyclePolicies; using Microsoft.Graph.GroupSettingTemplates; using Microsoft.Graph.GroupSettings; @@ -206,6 +208,14 @@ public class BaseGraphServiceClient : BaseRequestBuilder { public ExternalRequestBuilder External { get => new ExternalRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the collection of filterOperatorSchema entities. + public FilterOperatorsRequestBuilder FilterOperators { get => + new FilterOperatorsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the collection of attributeMappingFunctionSchema entities. + public FunctionsRequestBuilder Functions { get => + new FunctionsRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the collection of groupLifecyclePolicy entities. public GroupLifecyclePoliciesRequestBuilder GroupLifecyclePolicies { get => new GroupLifecyclePoliciesRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs index 2a100a57b67..7a42f5bd1c2 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Create a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new reply to a chatMessage in a specified channel. + /// Create a new reply to a chatMessage in a specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Chats/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Chats/Item/Messages/MessagesRequestBuilder.cs index 0bb1445adca..ebb8e2f76bf 100644 --- a/src/Microsoft.Graph/Generated/Chats/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Chats/Item/Messages/MessagesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Invite/InviteRequestBuilder.cs b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Invite/InviteRequestBuilder.cs index d76918f2c7f..0e35b3e8091 100644 --- a/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Invite/InviteRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Communications/Calls/Item/Participants/Invite/InviteRequestBuilder.cs @@ -28,8 +28,8 @@ public InviteRequestBuilder(Dictionary pathParameters, IRequestA public InviteRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/communications/calls/{call%2Did}/participants/invite", rawUrl) { } /// - /// Delete a specific participant in a call. In some situations, it is appropriate for an application to remove a participant from an active call. This action can be done before or after the participant answers the call. When an active caller is removed, they are immediately dropped from the call with no pre- or post-removal notification. When an invited participant is removed, any outstanding add participant request is canceled. - /// Find more info here + /// Invite participants to the active call. For more information about how to handle operations, see commsOperation. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -50,7 +50,7 @@ public async Task PostAsync(InvitePostRequestBody b return await RequestAdapter.SendAsync(requestInfo, InviteParticipantsOperation.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Delete a specific participant in a call. In some situations, it is appropriate for an application to remove a participant from an active call. This action can be done before or after the participant answers the call. When an active caller is removed, they are immediately dropped from the call with no pre- or post-removal notification. When an invited participant is removed, any outstanding add participant request is canceled. + /// Invite participants to the active call. For more information about how to handle operations, see commsOperation. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/ColumnsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/ColumnsRequestBuilder.cs index 4d4ed8349f9..444c4c72fb9 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/ColumnsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/Item/Columns/ColumnsRequestBuilder.cs @@ -47,7 +47,7 @@ public ColumnsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba } /// /// Retrieve a list of tablecolumn objects. - /// Find more info here + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/TablesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/TablesRequestBuilder.cs index 09bf716c6bd..da9fd8cc043 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/TablesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Tables/TablesRequestBuilder.cs @@ -47,7 +47,7 @@ public TablesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas } /// /// Retrieve a list of table objects. - /// Find more info here + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ChartsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ChartsRequestBuilder.cs index 2c263c8c347..bb0ea90511b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ChartsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/ChartsRequestBuilder.cs @@ -48,7 +48,7 @@ public ChartsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas } /// /// Retrieve a list of chart objects. - /// Find more info here + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/SeriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/SeriesRequestBuilder.cs index da095281e07..57613ca5c7b 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/SeriesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Charts/Item/Series/SeriesRequestBuilder.cs @@ -42,7 +42,7 @@ public SeriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas } /// /// Retrieve a list of chartseries objects. - /// Find more info here + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/ColumnsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/ColumnsRequestBuilder.cs index 72f30b1d2a5..63ebd5d2cc3 100644 --- a/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/ColumnsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Drives/Item/Items/Item/Workbook/Worksheets/Item/Tables/Item/Columns/ColumnsRequestBuilder.cs @@ -47,7 +47,7 @@ public ColumnsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba } /// /// Retrieve a list of tablecolumn objects. - /// Find more info here + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/FilterOperators/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/FilterOperators/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..68a05244f6c --- /dev/null +++ b/src/Microsoft.Graph/Generated/FilterOperators/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.FilterOperators.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/filterOperators/$count{?%24search,%24filter}", pathParameters) { + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/filterOperators/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/FilterOperators/FilterOperatorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/FilterOperators/FilterOperatorsRequestBuilder.cs new file mode 100644 index 00000000000..a79b731a4fd --- /dev/null +++ b/src/Microsoft.Graph/Generated/FilterOperators/FilterOperatorsRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.FilterOperators.Count; +using Microsoft.Graph.FilterOperators.Item; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.FilterOperators { + /// + /// Provides operations to manage the collection of filterOperatorSchema entities. + /// + public class FilterOperatorsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the collection of filterOperatorSchema entities. + public FilterOperatorSchemaItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("filterOperatorSchema%2Did", position); + return new FilterOperatorSchemaItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new FilterOperatorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FilterOperatorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/filterOperators{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new FilterOperatorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FilterOperatorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/filterOperators{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get entities from filterOperators + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, FilterOperatorSchemaCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Add new entity to filterOperators + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(FilterOperatorSchema body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(FilterOperatorSchema body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, FilterOperatorSchema.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get entities from filterOperators + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new FilterOperatorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Add new entity to filterOperators + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(FilterOperatorSchema body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(FilterOperatorSchema body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new FilterOperatorsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get entities from filterOperators + /// + public class FilterOperatorsRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FilterOperatorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public FilterOperatorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new FilterOperatorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new filterOperatorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public FilterOperatorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FilterOperatorsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new filterOperatorsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public FilterOperatorsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/FilterOperators/Item/FilterOperatorSchemaItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/FilterOperators/Item/FilterOperatorSchemaItemRequestBuilder.cs new file mode 100644 index 00000000000..4a8027c96e0 --- /dev/null +++ b/src/Microsoft.Graph/Generated/FilterOperators/Item/FilterOperatorSchemaItemRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.FilterOperators.Item { + /// + /// Provides operations to manage the collection of filterOperatorSchema entities. + /// + public class FilterOperatorSchemaItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new FilterOperatorSchemaItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FilterOperatorSchemaItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/filterOperators/{filterOperatorSchema%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new FilterOperatorSchemaItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FilterOperatorSchemaItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/filterOperators/{filterOperatorSchema%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete entity from filterOperators + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get entity from filterOperators by key + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, FilterOperatorSchema.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update entity in filterOperators + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(FilterOperatorSchema body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(FilterOperatorSchema body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, FilterOperatorSchema.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete entity from filterOperators + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new FilterOperatorSchemaItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get entity from filterOperators by key + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new FilterOperatorSchemaItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update entity in filterOperators + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(FilterOperatorSchema body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(FilterOperatorSchema body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new FilterOperatorSchemaItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FilterOperatorSchemaItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new FilterOperatorSchemaItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public FilterOperatorSchemaItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get entity from filterOperators by key + /// + public class FilterOperatorSchemaItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FilterOperatorSchemaItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public FilterOperatorSchemaItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new FilterOperatorSchemaItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new FilterOperatorSchemaItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public FilterOperatorSchemaItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FilterOperatorSchemaItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new FilterOperatorSchemaItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public FilterOperatorSchemaItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Functions/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/Functions/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..d7f0000a166 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Functions/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Functions.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/functions/$count{?%24search,%24filter}", pathParameters) { + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/functions/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Functions/FunctionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Functions/FunctionsRequestBuilder.cs new file mode 100644 index 00000000000..8095d4ad566 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Functions/FunctionsRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.Functions.Count; +using Microsoft.Graph.Functions.Item; +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Functions { + /// + /// Provides operations to manage the collection of attributeMappingFunctionSchema entities. + /// + public class FunctionsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the collection of attributeMappingFunctionSchema entities. + public AttributeMappingFunctionSchemaItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("attributeMappingFunctionSchema%2Did", position); + return new AttributeMappingFunctionSchemaItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new FunctionsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FunctionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/functions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new FunctionsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FunctionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/functions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get entities from functions + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, AttributeMappingFunctionSchemaCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Add new entity to functions + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(AttributeMappingFunctionSchema body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(AttributeMappingFunctionSchema body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, AttributeMappingFunctionSchema.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get entities from functions + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new FunctionsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Add new entity to functions + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(AttributeMappingFunctionSchema body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(AttributeMappingFunctionSchema body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new FunctionsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get entities from functions + /// + public class FunctionsRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FunctionsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public FunctionsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new FunctionsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new functionsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public FunctionsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FunctionsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new functionsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public FunctionsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Functions/Item/AttributeMappingFunctionSchemaItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Functions/Item/AttributeMappingFunctionSchemaItemRequestBuilder.cs new file mode 100644 index 00000000000..edd994f3deb --- /dev/null +++ b/src/Microsoft.Graph/Generated/Functions/Item/AttributeMappingFunctionSchemaItemRequestBuilder.cs @@ -0,0 +1,243 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.Functions.Item { + /// + /// Provides operations to manage the collection of attributeMappingFunctionSchema entities. + /// + public class AttributeMappingFunctionSchemaItemRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new AttributeMappingFunctionSchemaItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AttributeMappingFunctionSchemaItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/functions/{attributeMappingFunctionSchema%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new AttributeMappingFunctionSchemaItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AttributeMappingFunctionSchemaItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/functions/{attributeMappingFunctionSchema%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete entity from functions + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get entity from functions by key + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, AttributeMappingFunctionSchema.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update entity in functions + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(AttributeMappingFunctionSchema body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(AttributeMappingFunctionSchema body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, AttributeMappingFunctionSchema.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete entity from functions + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new AttributeMappingFunctionSchemaItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get entity from functions by key + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new AttributeMappingFunctionSchemaItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update entity in functions + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(AttributeMappingFunctionSchema body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(AttributeMappingFunctionSchema body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new AttributeMappingFunctionSchemaItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AttributeMappingFunctionSchemaItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new AttributeMappingFunctionSchemaItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public AttributeMappingFunctionSchemaItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get entity from functions by key + /// + public class AttributeMappingFunctionSchemaItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AttributeMappingFunctionSchemaItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public AttributeMappingFunctionSchemaItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new AttributeMappingFunctionSchemaItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new AttributeMappingFunctionSchemaItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public AttributeMappingFunctionSchemaItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AttributeMappingFunctionSchemaItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new AttributeMappingFunctionSchemaItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public AttributeMappingFunctionSchemaItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/ConversationsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/ConversationsRequestBuilder.cs index 868be5ebe4e..9f06ea5761d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/ConversationsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/ConversationsRequestBuilder.cs @@ -60,8 +60,8 @@ public async Task GetAsync(Action(requestInfo, ConversationCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. See known limitations of open extensions for more information. The table in the Permissions section lists the resources that support open extensions. - /// Find more info here + /// Use reply thread or reply post to further post to that conversation. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -108,7 +108,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. See known limitations of open extensions for more information. The table in the Permissions section lists the resources that support open extensions. + /// Use reply thread or reply post to further post to that conversation. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/ConversationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/ConversationItemRequestBuilder.cs index dc36c517f8a..28c40bf4552 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/ConversationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/ConversationItemRequestBuilder.cs @@ -34,7 +34,7 @@ public ConversationItemRequestBuilder(string rawUrl, IRequestAdapter requestAdap } /// /// Delete conversation. - /// Find more info here + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -53,8 +53,8 @@ public async Task DeleteAsync(Action - /// The group's conversations. - /// Find more info here + /// Retrieve the properties and relationships of conversation object. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -97,7 +97,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// The group's conversations. + /// Retrieve the properties and relationships of conversation object. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -139,7 +139,7 @@ public ConversationItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// The group's conversations. + /// Retrieve the properties and relationships of conversation object. /// public class ConversationItemRequestBuilderGetQueryParameters { /// Select properties to be returned diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/PostsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/PostsRequestBuilder.cs index bb87bc2df55..86b96feed2a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/PostsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Posts/PostsRequestBuilder.cs @@ -40,8 +40,8 @@ public PostsRequestBuilder(Dictionary pathParameters, IRequestAd public PostsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/conversations/{conversation%2Did}/threads/{conversationThread%2Did}/posts{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { } /// - /// Get the posts of the specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. - /// Find more info here + /// Get the properties and relationships of a post in a specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. Since the **post** resource supports extensions, you can also use the `GET` operation to get custom properties and extension data in a **post** instance. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -60,7 +60,7 @@ public async Task GetAsync(Action(requestInfo, PostCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Get the posts of the specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. + /// Get the properties and relationships of a post in a specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. Since the **post** resource supports extensions, you can also use the `GET` operation to get custom properties and extension data in a **post** instance. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -86,7 +86,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Get the posts of the specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. + /// Get the properties and relationships of a post in a specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. Since the **post** resource supports extensions, you can also use the `GET` operation to get custom properties and extension data in a **post** instance. /// public class PostsRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Reply/ReplyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Reply/ReplyRequestBuilder.cs index cf0a6b0cfdc..7f95b27073f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Reply/ReplyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Conversations/Item/Threads/Item/Reply/ReplyRequestBuilder.cs @@ -27,8 +27,8 @@ public ReplyRequestBuilder(Dictionary pathParameters, IRequestAd public ReplyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/conversations/{conversation%2Did}/threads/{conversationThread%2Did}/reply", rawUrl) { } /// - /// Add an attachment when creating a group post. This operation limits the size of the attachment you can add to under 3 MB. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - /// Find more info here + /// Reply to a thread in a group conversation and add a new post to it. You can specify the parent conversation in the request, or, you can specify just the thread without the parent conversation. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -49,7 +49,7 @@ public async Task PostAsync(ReplyPostRequestBody body, Action - /// Add an attachment when creating a group post. This operation limits the size of the attachment you can add to under 3 MB. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. + /// Reply to a thread in a group conversation and add a new post to it. You can specify the parent conversation in the request, or, you can specify just the thread without the parent conversation. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Groups/Item/GroupItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/GroupItemRequestBuilder.cs index 4d2afb5d28b..8f79517df84 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/GroupItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/GroupItemRequestBuilder.cs @@ -273,8 +273,8 @@ public async Task DeleteAsync(Action(requestInfo, Microsoft.Graph.Models.Group.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Update the properties of a group object. - /// Find more info here + /// Add a member to a security or Microsoft 365 group through the **members** navigation property. The following table shows the types of members that can be added to either security groups or Microsoft 365 groups. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -345,7 +345,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the properties of a group object. + /// Add a member to a security or Microsoft 365 group through the **members** navigation property. The following table shows the types of members that can be added to either security groups or Microsoft 365 groups. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ListItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ListItemRequestBuilder.cs index 5520af1acde..1cf69201c6f 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ListItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Sites/Item/Lists/Item/ListItemRequestBuilder.cs @@ -87,8 +87,8 @@ public async Task DeleteAsync(Action - /// Returns the metadata for a [list][]. - /// Find more info here + /// Get a list of rich long-running operations associated with a list. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -152,7 +152,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Returns the metadata for a [list][]. + /// Get a list of rich long-running operations associated with a list. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -222,7 +222,7 @@ public ListItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// Returns the metadata for a [list][]. + /// Get a list of rich long-running operations associated with a list. /// public class ListItemRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs index 83d43dad462..f8be8f7f9bf 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Create a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new reply to a chatMessage in a specified channel. + /// Create a new reply to a chatMessage in a specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/MessagesRequestBuilder.cs index e9e9ce473f2..ab8cf078c9d 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/Channels/Item/Messages/MessagesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs index d7a439251f3..a47cb584daa 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Create a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new reply to a chatMessage in a specified channel. + /// Create a new reply to a chatMessage in a specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/MessagesRequestBuilder.cs index 285aab11558..dda6616e03e 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Team/PrimaryChannel/Messages/MessagesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/ConversationThreadItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/ConversationThreadItemRequestBuilder.cs index e19afac8aa1..add0483962a 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/ConversationThreadItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/ConversationThreadItemRequestBuilder.cs @@ -39,7 +39,7 @@ public ConversationThreadItemRequestBuilder(string rawUrl, IRequestAdapter reque } /// /// Delete conversationThread. - /// Find more info here + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -58,8 +58,8 @@ public async Task DeleteAsync(Action - /// Get a specific thread that belongs to a group. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. - /// Find more info here + /// Get a thread object. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -124,7 +124,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Get a specific thread that belongs to a group. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. + /// Get a thread object. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -194,7 +194,7 @@ public ConversationThreadItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// Get a specific thread that belongs to a group. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. + /// Get a thread object. /// public class ConversationThreadItemRequestBuilderGetQueryParameters { /// Select properties to be returned diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/PostsRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/PostsRequestBuilder.cs index 42dbd415bbb..85ea5ac3a97 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/PostsRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Posts/PostsRequestBuilder.cs @@ -40,8 +40,8 @@ public PostsRequestBuilder(Dictionary pathParameters, IRequestAd public PostsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/threads/{conversationThread%2Did}/posts{?%24top,%24skip,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { } /// - /// Get the posts of the specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. - /// Find more info here + /// Get the properties and relationships of a post in a specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. Since the **post** resource supports extensions, you can also use the `GET` operation to get custom properties and extension data in a **post** instance. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -60,7 +60,7 @@ public async Task GetAsync(Action(requestInfo, PostCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Get the posts of the specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. + /// Get the properties and relationships of a post in a specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. Since the **post** resource supports extensions, you can also use the `GET` operation to get custom properties and extension data in a **post** instance. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -86,7 +86,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Get the posts of the specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. + /// Get the properties and relationships of a post in a specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. Since the **post** resource supports extensions, you can also use the `GET` operation to get custom properties and extension data in a **post** instance. /// public class PostsRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Reply/ReplyRequestBuilder.cs b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Reply/ReplyRequestBuilder.cs index da835e6d18c..a5267d5eabf 100644 --- a/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Reply/ReplyRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Groups/Item/Threads/Item/Reply/ReplyRequestBuilder.cs @@ -27,8 +27,8 @@ public ReplyRequestBuilder(Dictionary pathParameters, IRequestAd public ReplyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/groups/{group%2Did}/threads/{conversationThread%2Did}/reply", rawUrl) { } /// - /// Add an attachment when creating a group post. This operation limits the size of the attachment you can add to under 3 MB. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. - /// Find more info here + /// Reply to a thread in a group conversation and add a new post to it. You can specify the parent conversation in the request, or, you can specify just the thread without the parent conversation. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -49,7 +49,7 @@ public async Task PostAsync(ReplyPostRequestBody body, Action - /// Add an attachment when creating a group post. This operation limits the size of the attachment you can add to under 3 MB. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. + /// Reply to a thread in a group conversation and add a new post to it. You can specify the parent conversation in the request, or, you can specify just the thread without the parent conversation. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/NamedLocations/Item/NamedLocationItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/NamedLocations/Item/NamedLocationItemRequestBuilder.cs index f8814922d6f..8603771c290 100644 --- a/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/NamedLocations/Item/NamedLocationItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Identity/ConditionalAccess/NamedLocations/Item/NamedLocationItemRequestBuilder.cs @@ -28,8 +28,8 @@ public NamedLocationItemRequestBuilder(Dictionary pathParameters public NamedLocationItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/identity/conditionalAccess/namedLocations/{namedLocation%2Did}{?%24select,%24expand}", rawUrl) { } /// - /// Delete an ipNamedLocation object. - /// Find more info here + /// Delete a namedLocation object. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -48,8 +48,8 @@ public async Task DeleteAsync(Action - /// Retrieve the properties and relationships of a countryNamedLocation object. - /// Find more info here + /// Retrieve the properties and relationships of an ipNamedLocation object. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -90,7 +90,7 @@ public async Task PatchAsync(NamedLocation body, Action(requestInfo, NamedLocation.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Delete an ipNamedLocation object. + /// Delete a namedLocation object. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -114,7 +114,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Retrieve the properties and relationships of a countryNamedLocation object. + /// Retrieve the properties and relationships of an ipNamedLocation object. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -184,7 +184,7 @@ public NamedLocationItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// Retrieve the properties and relationships of a countryNamedLocation object. + /// Retrieve the properties and relationships of an ipNamedLocation object. /// public class NamedLocationItemRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/AgreementItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/AgreementItemRequestBuilder.cs index f3e0f2acff5..785aef48c9e 100644 --- a/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/AgreementItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/IdentityGovernance/TermsOfUse/Agreements/Item/AgreementItemRequestBuilder.cs @@ -63,8 +63,8 @@ public async Task DeleteAsync(Action - /// Retrieve the properties and relationships of an agreement object. - /// Find more info here + /// Retrieve all localized files related to an agreement. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -129,7 +129,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Retrieve the properties and relationships of an agreement object. + /// Retrieve all localized files related to an agreement. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -199,7 +199,7 @@ public AgreementItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// Retrieve the properties and relationships of an agreement object. + /// Retrieve all localized files related to an agreement. /// public class AgreementItemRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs index cdd9baf7324..0df958d0a00 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Create a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new reply to a chatMessage in a specified channel. + /// Create a new reply to a chatMessage in a specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/MessagesRequestBuilder.cs index 6ac50954884..25997044bb3 100644 --- a/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Chats/Item/Messages/MessagesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs index d75a604db71..622c20aac16 100644 --- a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Create a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new reply to a chatMessage in a specified channel. + /// Create a new reply to a chatMessage in a specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs index 307fa64c935..4b5feeb2361 100644 --- a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs index 82e1d912a4b..e0aff4710c0 100644 --- a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Create a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new reply to a chatMessage in a specified channel. + /// Create a new reply to a chatMessage in a specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs index e24b957b421..725a3b30c39 100644 --- a/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/JoinedTeams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/MailFolderItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/MailFolderItemRequestBuilder.cs index b7a555d604d..8fcd47b847a 100644 --- a/src/Microsoft.Graph/Generated/Me/MailFolders/Item/MailFolderItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MailFolders/Item/MailFolderItemRequestBuilder.cs @@ -93,8 +93,8 @@ public async Task GetAsync(Action(requestInfo, MailFolder.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Update the properties of mailfolder object. - /// Find more info here + /// Update the writable properties of a mailSearchFolder object. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -165,7 +165,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the properties of mailfolder object. + /// Update the writable properties of a mailSearchFolder object. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/MeRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/MeRequestBuilder.cs index eb3556b38a8..d3485da446b 100644 --- a/src/Microsoft.Graph/Generated/Me/MeRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/MeRequestBuilder.cs @@ -375,8 +375,8 @@ public ExportDeviceAndAppManagementDataWithSkipWithTopRequestBuilder ExportDevic return new ExportDeviceAndAppManagementDataWithSkipWithTopRequestBuilder(PathParameters, RequestAdapter, skip, top); } /// - /// Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. - /// Find more info here + /// Retrieve the properties and relationships of user object. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -427,7 +427,7 @@ public ReminderViewWithStartDateTimeWithEndDateTimeRequestBuilder ReminderViewWi return new ReminderViewWithStartDateTimeWithEndDateTimeRequestBuilder(PathParameters, RequestAdapter, endDateTime, startDateTime); } /// - /// Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. + /// Retrieve the properties and relationships of user object. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -481,7 +481,7 @@ public RequestInformation ToPatchRequestInformation(Microsoft.Graph.Models.User return requestInfo; } /// - /// Returns the user or organizational contact assigned as the user's manager. Optionally, you can expand the manager's chain up to the root node. + /// Retrieve the properties and relationships of user object. /// public class MeRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/Me/Messages/Item/MessageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Messages/Item/MessageItemRequestBuilder.cs index 4a32f86c9d8..66d88c12b17 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/Item/MessageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/Item/MessageItemRequestBuilder.cs @@ -109,7 +109,7 @@ public async Task DeleteAsync(Action /// The messages in a mailbox or folder. Read-only. Nullable. - /// Find more info here + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Me/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Me/Messages/MessagesRequestBuilder.cs index 025e038277e..5526e4fbfee 100644 --- a/src/Microsoft.Graph/Generated/Me/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Me/Messages/MessagesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, MessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. See known limitations of open extensions for more information. The table in the Permissions section lists the resources that support open extensions. - /// Find more info here + /// Create a draft of a new message in either JSON or MIME format. When using JSON format, you can:- Include an attachment to the **message**.- Update the draft later to add content to the **body** or change other message properties. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in **base64** format in the request body.- /* Add any attachments and S/MIME properties to the MIME content. By default, this operation saves the draft in the Drafts folder. Send the draft message in a subsequent operation. Alternatively, send a new message in a single operation, or create a draft to forward, reply and reply-all to an existing message. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. See known limitations of open extensions for more information. The table in the Permissions section lists the resources that support open extensions. + /// Create a draft of a new message in either JSON or MIME format. When using JSON format, you can:- Include an attachment to the **message**.- Update the draft later to add content to the **body** or change other message properties. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in **base64** format in the request body.- /* Add any attachments and S/MIME properties to the MIME content. By default, this operation saves the draft in the Drafts folder. Send the draft message in a subsequent operation. Alternatively, send a new message in a single operation, or create a draft to forward, reply and reply-all to an existing message. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Models/Application.cs b/src/Microsoft.Graph/Generated/Models/Application.cs index 468dafc30eb..b049e974c71 100644 --- a/src/Microsoft.Graph/Generated/Models/Application.cs +++ b/src/Microsoft.Graph/Generated/Models/Application.cs @@ -486,6 +486,20 @@ public SpaApplication Spa { get { return BackingStore?.Get("spa"); } set { BackingStore?.Set("spa", value); } } +#endif + /// The synchronization property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Models.Synchronization? Synchronization { + get { return BackingStore?.Get("synchronization"); } + set { BackingStore?.Set("synchronization", value); } + } +#nullable restore +#else + public Microsoft.Graph.Models.Synchronization Synchronization { + get { return BackingStore?.Get("synchronization"); } + set { BackingStore?.Set("synchronization", value); } + } #endif /// Custom strings that can be used to categorize and identify the application. Not nullable. Strings added here will also appear in the tags property of any associated service principals.Supports $filter (eq, not, ge, le, startsWith) and $search. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -618,6 +632,7 @@ public Application() : base() { {"serviceManagementReference", n => { ServiceManagementReference = n.GetStringValue(); } }, {"signInAudience", n => { SignInAudience = n.GetStringValue(); } }, {"spa", n => { Spa = n.GetObjectValue(SpaApplication.CreateFromDiscriminatorValue); } }, + {"synchronization", n => { Synchronization = n.GetObjectValue(Microsoft.Graph.Models.Synchronization.CreateFromDiscriminatorValue); } }, {"tags", n => { Tags = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, {"tokenEncryptionKeyId", n => { TokenEncryptionKeyId = n.GetGuidValue(); } }, {"tokenIssuancePolicies", n => { TokenIssuancePolicies = n.GetCollectionOfObjectValues(TokenIssuancePolicy.CreateFromDiscriminatorValue)?.ToList(); } }, @@ -670,6 +685,7 @@ public Application() : base() { writer.WriteStringValue("serviceManagementReference", ServiceManagementReference); writer.WriteStringValue("signInAudience", SignInAudience); writer.WriteObjectValue("spa", Spa); + writer.WriteObjectValue("synchronization", Synchronization); writer.WriteCollectionOfPrimitiveValues("tags", Tags); writer.WriteGuidValue("tokenEncryptionKeyId", TokenEncryptionKeyId); writer.WriteCollectionOfObjectValues("tokenIssuancePolicies", TokenIssuancePolicies); diff --git a/src/Microsoft.Graph/Generated/Models/AttributeDefinition.cs b/src/Microsoft.Graph/Generated/Models/AttributeDefinition.cs new file mode 100644 index 00000000000..9b7f51b3a15 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/AttributeDefinition.cs @@ -0,0 +1,192 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class AttributeDefinition : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// The anchor property + public bool? Anchor { + get { return BackingStore?.Get("anchor"); } + set { BackingStore?.Set("anchor", value); } + } + /// The apiExpressions property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? ApiExpressions { + get { return BackingStore?.Get?>("apiExpressions"); } + set { BackingStore?.Set("apiExpressions", value); } + } +#nullable restore +#else + public List ApiExpressions { + get { return BackingStore?.Get>("apiExpressions"); } + set { BackingStore?.Set("apiExpressions", value); } + } +#endif + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The caseExact property + public bool? CaseExact { + get { return BackingStore?.Get("caseExact"); } + set { BackingStore?.Set("caseExact", value); } + } + /// The defaultValue property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DefaultValue { + get { return BackingStore?.Get("defaultValue"); } + set { BackingStore?.Set("defaultValue", value); } + } +#nullable restore +#else + public string DefaultValue { + get { return BackingStore?.Get("defaultValue"); } + set { BackingStore?.Set("defaultValue", value); } + } +#endif + /// The flowNullValues property + public bool? FlowNullValues { + get { return BackingStore?.Get("flowNullValues"); } + set { BackingStore?.Set("flowNullValues", value); } + } + /// The metadata property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Metadata { + get { return BackingStore?.Get?>("metadata"); } + set { BackingStore?.Set("metadata", value); } + } +#nullable restore +#else + public List Metadata { + get { return BackingStore?.Get>("metadata"); } + set { BackingStore?.Set("metadata", value); } + } +#endif + /// The multivalued property + public bool? Multivalued { + get { return BackingStore?.Get("multivalued"); } + set { BackingStore?.Set("multivalued", value); } + } + /// The mutability property + public Microsoft.Graph.Models.Mutability? Mutability { + get { return BackingStore?.Get("mutability"); } + set { BackingStore?.Set("mutability", value); } + } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { + get { return BackingStore?.Get("name"); } + set { BackingStore?.Set("name", value); } + } +#nullable restore +#else + public string Name { + get { return BackingStore?.Get("name"); } + set { BackingStore?.Set("name", value); } + } +#endif + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The referencedObjects property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? ReferencedObjects { + get { return BackingStore?.Get?>("referencedObjects"); } + set { BackingStore?.Set("referencedObjects", value); } + } +#nullable restore +#else + public List ReferencedObjects { + get { return BackingStore?.Get>("referencedObjects"); } + set { BackingStore?.Set("referencedObjects", value); } + } +#endif + /// The required property + public bool? Required { + get { return BackingStore?.Get("required"); } + set { BackingStore?.Set("required", value); } + } + /// The type property + public AttributeType? Type { + get { return BackingStore?.Get("type"); } + set { BackingStore?.Set("type", value); } + } + /// + /// Instantiates a new attributeDefinition and sets the default values. + /// + public AttributeDefinition() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static AttributeDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AttributeDefinition(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"anchor", n => { Anchor = n.GetBoolValue(); } }, + {"apiExpressions", n => { ApiExpressions = n.GetCollectionOfObjectValues(StringKeyStringValuePair.CreateFromDiscriminatorValue)?.ToList(); } }, + {"caseExact", n => { CaseExact = n.GetBoolValue(); } }, + {"defaultValue", n => { DefaultValue = n.GetStringValue(); } }, + {"flowNullValues", n => { FlowNullValues = n.GetBoolValue(); } }, + {"metadata", n => { Metadata = n.GetCollectionOfObjectValues(AttributeDefinitionMetadataEntry.CreateFromDiscriminatorValue)?.ToList(); } }, + {"multivalued", n => { Multivalued = n.GetBoolValue(); } }, + {"mutability", n => { Mutability = n.GetEnumValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"referencedObjects", n => { ReferencedObjects = n.GetCollectionOfObjectValues(ReferencedObject.CreateFromDiscriminatorValue)?.ToList(); } }, + {"required", n => { Required = n.GetBoolValue(); } }, + {"type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("anchor", Anchor); + writer.WriteCollectionOfObjectValues("apiExpressions", ApiExpressions); + writer.WriteBoolValue("caseExact", CaseExact); + writer.WriteStringValue("defaultValue", DefaultValue); + writer.WriteBoolValue("flowNullValues", FlowNullValues); + writer.WriteCollectionOfObjectValues("metadata", Metadata); + writer.WriteBoolValue("multivalued", Multivalued); + writer.WriteEnumValue("mutability", Mutability); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteCollectionOfObjectValues("referencedObjects", ReferencedObjects); + writer.WriteBoolValue("required", Required); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/AttributeDefinitionMetadata.cs b/src/Microsoft.Graph/Generated/Models/AttributeDefinitionMetadata.cs new file mode 100644 index 00000000000..de8ee9a167d --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/AttributeDefinitionMetadata.cs @@ -0,0 +1,24 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum AttributeDefinitionMetadata { + [EnumMember(Value = "BaseAttributeName")] + BaseAttributeName, + [EnumMember(Value = "ComplexObjectDefinition")] + ComplexObjectDefinition, + [EnumMember(Value = "IsContainer")] + IsContainer, + [EnumMember(Value = "IsCustomerDefined")] + IsCustomerDefined, + [EnumMember(Value = "IsDomainQualified")] + IsDomainQualified, + [EnumMember(Value = "LinkPropertyNames")] + LinkPropertyNames, + [EnumMember(Value = "LinkTypeName")] + LinkTypeName, + [EnumMember(Value = "MaximumLength")] + MaximumLength, + [EnumMember(Value = "ReferencedProperty")] + ReferencedProperty, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/AttributeDefinitionMetadataEntry.cs b/src/Microsoft.Graph/Generated/Models/AttributeDefinitionMetadataEntry.cs new file mode 100644 index 00000000000..1f095b761a0 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/AttributeDefinitionMetadataEntry.cs @@ -0,0 +1,86 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class AttributeDefinitionMetadataEntry : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The key property + public AttributeDefinitionMetadata? Key { + get { return BackingStore?.Get("key"); } + set { BackingStore?.Set("key", value); } + } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Value { + get { return BackingStore?.Get("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public string Value { + get { return BackingStore?.Get("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// Instantiates a new attributeDefinitionMetadataEntry and sets the default values. + /// + public AttributeDefinitionMetadataEntry() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static AttributeDefinitionMetadataEntry CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AttributeDefinitionMetadataEntry(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"key", n => { Key = n.GetEnumValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"value", n => { Value = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("key", Key); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteStringValue("value", Value); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/AttributeFlowBehavior.cs b/src/Microsoft.Graph/Generated/Models/AttributeFlowBehavior.cs new file mode 100644 index 00000000000..91733578567 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/AttributeFlowBehavior.cs @@ -0,0 +1,10 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum AttributeFlowBehavior { + [EnumMember(Value = "FlowWhenChanged")] + FlowWhenChanged, + [EnumMember(Value = "FlowAlways")] + FlowAlways, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/AttributeFlowType.cs b/src/Microsoft.Graph/Generated/Models/AttributeFlowType.cs new file mode 100644 index 00000000000..2f84d9e3501 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/AttributeFlowType.cs @@ -0,0 +1,16 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum AttributeFlowType { + [EnumMember(Value = "Always")] + Always, + [EnumMember(Value = "ObjectAddOnly")] + ObjectAddOnly, + [EnumMember(Value = "MultiValueAddOnly")] + MultiValueAddOnly, + [EnumMember(Value = "ValueAddOnly")] + ValueAddOnly, + [EnumMember(Value = "AttributeAddOnly")] + AttributeAddOnly, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/AttributeMapping.cs b/src/Microsoft.Graph/Generated/Models/AttributeMapping.cs new file mode 100644 index 00000000000..93d541cc8c9 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/AttributeMapping.cs @@ -0,0 +1,139 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class AttributeMapping : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The defaultValue property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DefaultValue { + get { return BackingStore?.Get("defaultValue"); } + set { BackingStore?.Set("defaultValue", value); } + } +#nullable restore +#else + public string DefaultValue { + get { return BackingStore?.Get("defaultValue"); } + set { BackingStore?.Set("defaultValue", value); } + } +#endif + /// The exportMissingReferences property + public bool? ExportMissingReferences { + get { return BackingStore?.Get("exportMissingReferences"); } + set { BackingStore?.Set("exportMissingReferences", value); } + } + /// The flowBehavior property + public AttributeFlowBehavior? FlowBehavior { + get { return BackingStore?.Get("flowBehavior"); } + set { BackingStore?.Set("flowBehavior", value); } + } + /// The flowType property + public AttributeFlowType? FlowType { + get { return BackingStore?.Get("flowType"); } + set { BackingStore?.Set("flowType", value); } + } + /// The matchingPriority property + public int? MatchingPriority { + get { return BackingStore?.Get("matchingPriority"); } + set { BackingStore?.Set("matchingPriority", value); } + } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The source property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public AttributeMappingSource? Source { + get { return BackingStore?.Get("source"); } + set { BackingStore?.Set("source", value); } + } +#nullable restore +#else + public AttributeMappingSource Source { + get { return BackingStore?.Get("source"); } + set { BackingStore?.Set("source", value); } + } +#endif + /// The targetAttributeName property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TargetAttributeName { + get { return BackingStore?.Get("targetAttributeName"); } + set { BackingStore?.Set("targetAttributeName", value); } + } +#nullable restore +#else + public string TargetAttributeName { + get { return BackingStore?.Get("targetAttributeName"); } + set { BackingStore?.Set("targetAttributeName", value); } + } +#endif + /// + /// Instantiates a new attributeMapping and sets the default values. + /// + public AttributeMapping() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static AttributeMapping CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AttributeMapping(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"defaultValue", n => { DefaultValue = n.GetStringValue(); } }, + {"exportMissingReferences", n => { ExportMissingReferences = n.GetBoolValue(); } }, + {"flowBehavior", n => { FlowBehavior = n.GetEnumValue(); } }, + {"flowType", n => { FlowType = n.GetEnumValue(); } }, + {"matchingPriority", n => { MatchingPriority = n.GetIntValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"source", n => { Source = n.GetObjectValue(AttributeMappingSource.CreateFromDiscriminatorValue); } }, + {"targetAttributeName", n => { TargetAttributeName = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("defaultValue", DefaultValue); + writer.WriteBoolValue("exportMissingReferences", ExportMissingReferences); + writer.WriteEnumValue("flowBehavior", FlowBehavior); + writer.WriteEnumValue("flowType", FlowType); + writer.WriteIntValue("matchingPriority", MatchingPriority); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteObjectValue("source", Source); + writer.WriteStringValue("targetAttributeName", TargetAttributeName); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/AttributeMappingFunctionSchema.cs b/src/Microsoft.Graph/Generated/Models/AttributeMappingFunctionSchema.cs new file mode 100644 index 00000000000..8ea8ffa9066 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/AttributeMappingFunctionSchema.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class AttributeMappingFunctionSchema : Entity, IParsable { + /// The parameters property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Parameters { + get { return BackingStore?.Get?>("parameters"); } + set { BackingStore?.Set("parameters", value); } + } +#nullable restore +#else + public List Parameters { + get { return BackingStore?.Get>("parameters"); } + set { BackingStore?.Set("parameters", value); } + } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static new AttributeMappingFunctionSchema CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AttributeMappingFunctionSchema(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"parameters", n => { Parameters = n.GetCollectionOfObjectValues(AttributeMappingParameterSchema.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("parameters", Parameters); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/AttributeMappingFunctionSchemaCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/AttributeMappingFunctionSchemaCollectionResponse.cs new file mode 100644 index 00000000000..823293aa1fb --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/AttributeMappingFunctionSchemaCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class AttributeMappingFunctionSchemaCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static new AttributeMappingFunctionSchemaCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AttributeMappingFunctionSchemaCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(AttributeMappingFunctionSchema.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/AttributeMappingParameterSchema.cs b/src/Microsoft.Graph/Generated/Models/AttributeMappingParameterSchema.cs new file mode 100644 index 00000000000..ce32abaed2c --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/AttributeMappingParameterSchema.cs @@ -0,0 +1,100 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class AttributeMappingParameterSchema : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// The allowMultipleOccurrences property + public bool? AllowMultipleOccurrences { + get { return BackingStore?.Get("allowMultipleOccurrences"); } + set { BackingStore?.Set("allowMultipleOccurrences", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { + get { return BackingStore?.Get("name"); } + set { BackingStore?.Set("name", value); } + } +#nullable restore +#else + public string Name { + get { return BackingStore?.Get("name"); } + set { BackingStore?.Set("name", value); } + } +#endif + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The required property + public bool? Required { + get { return BackingStore?.Get("required"); } + set { BackingStore?.Set("required", value); } + } + /// The type property + public AttributeType? Type { + get { return BackingStore?.Get("type"); } + set { BackingStore?.Set("type", value); } + } + /// + /// Instantiates a new attributeMappingParameterSchema and sets the default values. + /// + public AttributeMappingParameterSchema() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static AttributeMappingParameterSchema CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AttributeMappingParameterSchema(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"allowMultipleOccurrences", n => { AllowMultipleOccurrences = n.GetBoolValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"required", n => { Required = n.GetBoolValue(); } }, + {"type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteBoolValue("allowMultipleOccurrences", AllowMultipleOccurrences); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteBoolValue("required", Required); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/AttributeMappingSource.cs b/src/Microsoft.Graph/Generated/Models/AttributeMappingSource.cs new file mode 100644 index 00000000000..1c1065c44b2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/AttributeMappingSource.cs @@ -0,0 +1,118 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class AttributeMappingSource : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The expression property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Expression { + get { return BackingStore?.Get("expression"); } + set { BackingStore?.Set("expression", value); } + } +#nullable restore +#else + public string Expression { + get { return BackingStore?.Get("expression"); } + set { BackingStore?.Set("expression", value); } + } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { + get { return BackingStore?.Get("name"); } + set { BackingStore?.Set("name", value); } + } +#nullable restore +#else + public string Name { + get { return BackingStore?.Get("name"); } + set { BackingStore?.Set("name", value); } + } +#endif + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The parameters property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Parameters { + get { return BackingStore?.Get?>("parameters"); } + set { BackingStore?.Set("parameters", value); } + } +#nullable restore +#else + public List Parameters { + get { return BackingStore?.Get>("parameters"); } + set { BackingStore?.Set("parameters", value); } + } +#endif + /// The type property + public AttributeMappingSourceType? Type { + get { return BackingStore?.Get("type"); } + set { BackingStore?.Set("type", value); } + } + /// + /// Instantiates a new attributeMappingSource and sets the default values. + /// + public AttributeMappingSource() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static AttributeMappingSource CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AttributeMappingSource(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"expression", n => { Expression = n.GetStringValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"parameters", n => { Parameters = n.GetCollectionOfObjectValues(StringKeyAttributeMappingSourceValuePair.CreateFromDiscriminatorValue)?.ToList(); } }, + {"type", n => { Type = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("expression", Expression); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteCollectionOfObjectValues("parameters", Parameters); + writer.WriteEnumValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/AttributeMappingSourceType.cs b/src/Microsoft.Graph/Generated/Models/AttributeMappingSourceType.cs new file mode 100644 index 00000000000..640ed0b65ea --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/AttributeMappingSourceType.cs @@ -0,0 +1,12 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum AttributeMappingSourceType { + [EnumMember(Value = "Attribute")] + Attribute, + [EnumMember(Value = "Constant")] + Constant, + [EnumMember(Value = "Function")] + Function, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/AttributeType.cs b/src/Microsoft.Graph/Generated/Models/AttributeType.cs new file mode 100644 index 00000000000..813d26a0ed5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/AttributeType.cs @@ -0,0 +1,18 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum AttributeType { + [EnumMember(Value = "String")] + String, + [EnumMember(Value = "Integer")] + Integer, + [EnumMember(Value = "Reference")] + Reference, + [EnumMember(Value = "Binary")] + Binary, + [EnumMember(Value = "Boolean")] + Boolean, + [EnumMember(Value = "DateTime")] + DateTime, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/ChatMessage.cs b/src/Microsoft.Graph/Generated/Models/ChatMessage.cs index 6057eb8f78c..730111ab191 100644 --- a/src/Microsoft.Graph/Generated/Models/ChatMessage.cs +++ b/src/Microsoft.Graph/Generated/Models/ChatMessage.cs @@ -170,7 +170,7 @@ public List Mentions { set { BackingStore?.Set("mentions", value); } } #endif - /// The messageHistory property + /// List of activity history of a message item, including modification time and actions, such as reactionAdded, reactionRemoved, or reaction changes, on the message. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public List? MessageHistory { diff --git a/src/Microsoft.Graph/Generated/Models/ChatMessageHistoryItem.cs b/src/Microsoft.Graph/Generated/Models/ChatMessageHistoryItem.cs index 2b1b58847fd..2512300b2ca 100644 --- a/src/Microsoft.Graph/Generated/Models/ChatMessageHistoryItem.cs +++ b/src/Microsoft.Graph/Generated/Models/ChatMessageHistoryItem.cs @@ -18,7 +18,7 @@ public IDictionary AdditionalData { } /// Stores model information. public IBackingStore BackingStore { get; private set; } - /// The modifiedDateTime property + /// The date and time when the message was modified. public DateTimeOffset? ModifiedDateTime { get { return BackingStore?.Get("modifiedDateTime"); } set { BackingStore?.Set("modifiedDateTime", value); } @@ -37,7 +37,7 @@ public string OdataType { set { BackingStore?.Set("@odata.type", value); } } #endif - /// The reaction property + /// The reaction in the modified message. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public ChatMessageReaction? Reaction { diff --git a/src/Microsoft.Graph/Generated/Models/CollapseProperty.cs b/src/Microsoft.Graph/Generated/Models/CollapseProperty.cs new file mode 100644 index 00000000000..2e0be56b6a7 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/CollapseProperty.cs @@ -0,0 +1,86 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class CollapseProperty : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The fields property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Fields { + get { return BackingStore?.Get?>("fields"); } + set { BackingStore?.Set("fields", value); } + } +#nullable restore +#else + public List Fields { + get { return BackingStore?.Get>("fields"); } + set { BackingStore?.Set("fields", value); } + } +#endif + /// The limit property + public int? Limit { + get { return BackingStore?.Get("limit"); } + set { BackingStore?.Set("limit", value); } + } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// + /// Instantiates a new collapseProperty and sets the default values. + /// + public CollapseProperty() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static CollapseProperty CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new CollapseProperty(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"fields", n => { Fields = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"limit", n => { Limit = n.GetIntValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("fields", Fields); + writer.WriteIntValue("limit", Limit); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/ContainerFilter.cs b/src/Microsoft.Graph/Generated/Models/ContainerFilter.cs new file mode 100644 index 00000000000..b0ee2ba69f5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/ContainerFilter.cs @@ -0,0 +1,79 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class ContainerFilter : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The includedContainers property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? IncludedContainers { + get { return BackingStore?.Get?>("includedContainers"); } + set { BackingStore?.Set("includedContainers", value); } + } +#nullable restore +#else + public List IncludedContainers { + get { return BackingStore?.Get>("includedContainers"); } + set { BackingStore?.Set("includedContainers", value); } + } +#endif + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// + /// Instantiates a new containerFilter and sets the default values. + /// + public ContainerFilter() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static ContainerFilter CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ContainerFilter(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"includedContainers", n => { IncludedContainers = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("includedContainers", IncludedContainers); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Contract.cs b/src/Microsoft.Graph/Generated/Models/Contract.cs index 5499cbac066..897800ee6e2 100644 --- a/src/Microsoft.Graph/Generated/Models/Contract.cs +++ b/src/Microsoft.Graph/Generated/Models/Contract.cs @@ -53,7 +53,7 @@ public string DisplayName { } #endif /// - /// Instantiates a new Contract and sets the default values. + /// Instantiates a new contract and sets the default values. /// public Contract() : base() { OdataType = "#microsoft.graph.contract"; diff --git a/src/Microsoft.Graph/Generated/Models/DefaultUserRolePermissions.cs b/src/Microsoft.Graph/Generated/Models/DefaultUserRolePermissions.cs index 9d43723bc22..f8ec98885ba 100644 --- a/src/Microsoft.Graph/Generated/Models/DefaultUserRolePermissions.cs +++ b/src/Microsoft.Graph/Generated/Models/DefaultUserRolePermissions.cs @@ -21,6 +21,11 @@ public bool? AllowedToCreateSecurityGroups { get { return BackingStore?.Get("allowedToCreateSecurityGroups"); } set { BackingStore?.Set("allowedToCreateSecurityGroups", value); } } + /// Indicates whether the default user role can create tenants. + public bool? AllowedToCreateTenants { + get { return BackingStore?.Get("allowedToCreateTenants"); } + set { BackingStore?.Set("allowedToCreateTenants", value); } + } /// Indicates whether the registered owners of a device can read their own BitLocker recovery keys with default user role. public bool? AllowedToReadBitlockerKeysForOwnedDevice { get { return BackingStore?.Get("allowedToReadBitlockerKeysForOwnedDevice"); } @@ -83,6 +88,7 @@ public IDictionary> GetFieldDeserializers() { return new Dictionary> { {"allowedToCreateApps", n => { AllowedToCreateApps = n.GetBoolValue(); } }, {"allowedToCreateSecurityGroups", n => { AllowedToCreateSecurityGroups = n.GetBoolValue(); } }, + {"allowedToCreateTenants", n => { AllowedToCreateTenants = n.GetBoolValue(); } }, {"allowedToReadBitlockerKeysForOwnedDevice", n => { AllowedToReadBitlockerKeysForOwnedDevice = n.GetBoolValue(); } }, {"allowedToReadOtherUsers", n => { AllowedToReadOtherUsers = n.GetBoolValue(); } }, {"@odata.type", n => { OdataType = n.GetStringValue(); } }, @@ -97,6 +103,7 @@ public void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteBoolValue("allowedToCreateApps", AllowedToCreateApps); writer.WriteBoolValue("allowedToCreateSecurityGroups", AllowedToCreateSecurityGroups); + writer.WriteBoolValue("allowedToCreateTenants", AllowedToCreateTenants); writer.WriteBoolValue("allowedToReadBitlockerKeysForOwnedDevice", AllowedToReadBitlockerKeysForOwnedDevice); writer.WriteBoolValue("allowedToReadOtherUsers", AllowedToReadOtherUsers); writer.WriteStringValue("@odata.type", OdataType); diff --git a/src/Microsoft.Graph/Generated/Models/DeviceCategory.cs b/src/Microsoft.Graph/Generated/Models/DeviceCategory.cs index 10808146015..e6ea8517b9b 100644 --- a/src/Microsoft.Graph/Generated/Models/DeviceCategory.cs +++ b/src/Microsoft.Graph/Generated/Models/DeviceCategory.cs @@ -4,9 +4,6 @@ using System.Linq; using System; namespace Microsoft.Graph.Models { - /// - /// Device categories provides a way to organize your devices. Using device categories, company administrators can define their own categories that make sense to their company. These categories can then be applied to a device in the Intune Azure console or selected by a user during device enrollment. You can filter reports and create dynamic Azure Active Directory device groups based on device categories. - /// public class DeviceCategory : Entity, IParsable { /// Optional description for the device category. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER diff --git a/src/Microsoft.Graph/Generated/Models/DirectoryDefinition.cs b/src/Microsoft.Graph/Generated/Models/DirectoryDefinition.cs new file mode 100644 index 00000000000..7243e4894b0 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/DirectoryDefinition.cs @@ -0,0 +1,101 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class DirectoryDefinition : Entity, IParsable { + /// The discoverabilities property + public DirectoryDefinitionDiscoverabilities? Discoverabilities { + get { return BackingStore?.Get("discoverabilities"); } + set { BackingStore?.Set("discoverabilities", value); } + } + /// The discoveryDateTime property + public DateTimeOffset? DiscoveryDateTime { + get { return BackingStore?.Get("discoveryDateTime"); } + set { BackingStore?.Set("discoveryDateTime", value); } + } + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { + get { return BackingStore?.Get("name"); } + set { BackingStore?.Set("name", value); } + } +#nullable restore +#else + public string Name { + get { return BackingStore?.Get("name"); } + set { BackingStore?.Set("name", value); } + } +#endif + /// The objects property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Objects { + get { return BackingStore?.Get?>("objects"); } + set { BackingStore?.Set("objects", value); } + } +#nullable restore +#else + public List Objects { + get { return BackingStore?.Get>("objects"); } + set { BackingStore?.Set("objects", value); } + } +#endif + /// The readOnly property + public bool? ReadOnly { + get { return BackingStore?.Get("readOnly"); } + set { BackingStore?.Set("readOnly", value); } + } + /// The version property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Version { + get { return BackingStore?.Get("version"); } + set { BackingStore?.Set("version", value); } + } +#nullable restore +#else + public string Version { + get { return BackingStore?.Get("version"); } + set { BackingStore?.Set("version", value); } + } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static new DirectoryDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new DirectoryDefinition(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"discoverabilities", n => { Discoverabilities = n.GetEnumValue(); } }, + {"discoveryDateTime", n => { DiscoveryDateTime = n.GetDateTimeOffsetValue(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + {"objects", n => { Objects = n.GetCollectionOfObjectValues(ObjectDefinition.CreateFromDiscriminatorValue)?.ToList(); } }, + {"readOnly", n => { ReadOnly = n.GetBoolValue(); } }, + {"version", n => { Version = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteEnumValue("discoverabilities", Discoverabilities); + writer.WriteDateTimeOffsetValue("discoveryDateTime", DiscoveryDateTime); + writer.WriteStringValue("name", Name); + writer.WriteCollectionOfObjectValues("objects", Objects); + writer.WriteBoolValue("readOnly", ReadOnly); + writer.WriteStringValue("version", Version); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/DirectoryDefinitionCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/DirectoryDefinitionCollectionResponse.cs new file mode 100644 index 00000000000..ef23172c7fd --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/DirectoryDefinitionCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class DirectoryDefinitionCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static new DirectoryDefinitionCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new DirectoryDefinitionCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(DirectoryDefinition.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/DirectoryDefinitionDiscoverabilities.cs b/src/Microsoft.Graph/Generated/Models/DirectoryDefinitionDiscoverabilities.cs new file mode 100644 index 00000000000..6d417d54ed6 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/DirectoryDefinitionDiscoverabilities.cs @@ -0,0 +1,18 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum DirectoryDefinitionDiscoverabilities { + [EnumMember(Value = "None")] + None, + [EnumMember(Value = "AttributeNames")] + AttributeNames, + [EnumMember(Value = "AttributeDataTypes")] + AttributeDataTypes, + [EnumMember(Value = "AttributeReadOnly")] + AttributeReadOnly, + [EnumMember(Value = "ReferenceAttributes")] + ReferenceAttributes, + [EnumMember(Value = "UnknownFutureValue")] + UnknownFutureValue, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/DirectoryRoleTemplate.cs b/src/Microsoft.Graph/Generated/Models/DirectoryRoleTemplate.cs index a2ac389cc19..22896fd75e6 100644 --- a/src/Microsoft.Graph/Generated/Models/DirectoryRoleTemplate.cs +++ b/src/Microsoft.Graph/Generated/Models/DirectoryRoleTemplate.cs @@ -34,7 +34,7 @@ public string DisplayName { } #endif /// - /// Instantiates a new directoryRoleTemplate and sets the default values. + /// Instantiates a new DirectoryRoleTemplate and sets the default values. /// public DirectoryRoleTemplate() : base() { OdataType = "#microsoft.graph.directoryRoleTemplate"; diff --git a/src/Microsoft.Graph/Generated/Models/Entity.cs b/src/Microsoft.Graph/Generated/Models/Entity.cs index ce588e6f112..d0e809760cf 100644 --- a/src/Microsoft.Graph/Generated/Models/Entity.cs +++ b/src/Microsoft.Graph/Generated/Models/Entity.cs @@ -121,6 +121,7 @@ public static Entity CreateFromDiscriminatorValue(IParseNode parseNode) { "#microsoft.graph.attachmentSession" => new AttachmentSession(), "#microsoft.graph.attackSimulationRoot" => new AttackSimulationRoot(), "#microsoft.graph.attendanceRecord" => new AttendanceRecord(), + "#microsoft.graph.attributeMappingFunctionSchema" => new AttributeMappingFunctionSchema(), "#microsoft.graph.attributeSet" => new AttributeSet(), "#microsoft.graph.audioRoutingGroup" => new AudioRoutingGroup(), "#microsoft.graph.auditEvent" => new AuditEvent(), @@ -244,6 +245,7 @@ public static Entity CreateFromDiscriminatorValue(IParseNode parseNode) { "#microsoft.graph.deviceManagementTroubleshootingEvent" => new DeviceManagementTroubleshootingEvent(), "#microsoft.graph.directory" => new DirectoryObject(), "#microsoft.graph.directoryAudit" => new DirectoryAudit(), + "#microsoft.graph.directoryDefinition" => new DirectoryDefinition(), "#microsoft.graph.directoryObject" => new DirectoryObject(), "#microsoft.graph.directoryObjectPartnerReference" => new DirectoryObjectPartnerReference(), "#microsoft.graph.directoryRole" => new DirectoryRole(), @@ -311,6 +313,7 @@ public static Entity CreateFromDiscriminatorValue(IParseNode parseNode) { "#microsoft.graph.fieldValueSet" => new FieldValueSet(), "#microsoft.graph.fileAssessmentRequest" => new FileAssessmentRequest(), "#microsoft.graph.fileAttachment" => new FileAttachment(), + "#microsoft.graph.filterOperatorSchema" => new FilterOperatorSchema(), "#microsoft.graph.group" => new Group(), "#microsoft.graph.groupLifecyclePolicy" => new GroupLifecyclePolicy(), "#microsoft.graph.groupSetting" => new GroupSetting(), @@ -593,6 +596,10 @@ public static Entity CreateFromDiscriminatorValue(IParseNode parseNode) { "#microsoft.graph.subscribeToToneOperation" => new SubscribeToToneOperation(), "#microsoft.graph.subscription" => new Subscription(), "#microsoft.graph.swapShiftsChangeRequest" => new SwapShiftsChangeRequest(), + "#microsoft.graph.synchronization" => new Synchronization(), + "#microsoft.graph.synchronizationJob" => new SynchronizationJob(), + "#microsoft.graph.synchronizationSchema" => new SynchronizationSchema(), + "#microsoft.graph.synchronizationTemplate" => new SynchronizationTemplate(), "#microsoft.graph.targetedManagedAppConfiguration" => new TargetedManagedAppConfiguration(), "#microsoft.graph.targetedManagedAppPolicyAssignment" => new TargetedManagedAppPolicyAssignment(), "#microsoft.graph.targetedManagedAppProtection" => new TargetedManagedAppProtection(), diff --git a/src/Microsoft.Graph/Generated/Models/EntityType.cs b/src/Microsoft.Graph/Generated/Models/EntityType.cs index 8412ed97465..2a0e89accd8 100644 --- a/src/Microsoft.Graph/Generated/Models/EntityType.cs +++ b/src/Microsoft.Graph/Generated/Models/EntityType.cs @@ -20,6 +20,10 @@ public enum EntityType { Drive, [EnumMember(Value = "unknownFutureValue")] UnknownFutureValue, + [EnumMember(Value = "acronym")] + Acronym, + [EnumMember(Value = "bookmark")] + Bookmark, [EnumMember(Value = "chatMessage")] ChatMessage, [EnumMember(Value = "person")] diff --git a/src/Microsoft.Graph/Generated/Models/ExpressionInputObject.cs b/src/Microsoft.Graph/Generated/Models/ExpressionInputObject.cs new file mode 100644 index 00000000000..dc07f3d33df --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/ExpressionInputObject.cs @@ -0,0 +1,95 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class ExpressionInputObject : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The definition property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public ObjectDefinition? Definition { + get { return BackingStore?.Get("definition"); } + set { BackingStore?.Set("definition", value); } + } +#nullable restore +#else + public ObjectDefinition Definition { + get { return BackingStore?.Get("definition"); } + set { BackingStore?.Set("definition", value); } + } +#endif + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The properties property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Properties { + get { return BackingStore?.Get?>("properties"); } + set { BackingStore?.Set("properties", value); } + } +#nullable restore +#else + public List Properties { + get { return BackingStore?.Get>("properties"); } + set { BackingStore?.Set("properties", value); } + } +#endif + /// + /// Instantiates a new expressionInputObject and sets the default values. + /// + public ExpressionInputObject() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static ExpressionInputObject CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ExpressionInputObject(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"definition", n => { Definition = n.GetObjectValue(ObjectDefinition.CreateFromDiscriminatorValue); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"properties", n => { Properties = n.GetCollectionOfObjectValues(StringKeyObjectValuePair.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("definition", Definition); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteCollectionOfObjectValues("properties", Properties); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Filter.cs b/src/Microsoft.Graph/Generated/Models/Filter.cs new file mode 100644 index 00000000000..f849fb7f93c --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Filter.cs @@ -0,0 +1,111 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class Filter : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The categoryFilterGroups property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? CategoryFilterGroups { + get { return BackingStore?.Get?>("categoryFilterGroups"); } + set { BackingStore?.Set("categoryFilterGroups", value); } + } +#nullable restore +#else + public List CategoryFilterGroups { + get { return BackingStore?.Get>("categoryFilterGroups"); } + set { BackingStore?.Set("categoryFilterGroups", value); } + } +#endif + /// The groups property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Groups { + get { return BackingStore?.Get?>("groups"); } + set { BackingStore?.Set("groups", value); } + } +#nullable restore +#else + public List Groups { + get { return BackingStore?.Get>("groups"); } + set { BackingStore?.Set("groups", value); } + } +#endif + /// The inputFilterGroups property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? InputFilterGroups { + get { return BackingStore?.Get?>("inputFilterGroups"); } + set { BackingStore?.Set("inputFilterGroups", value); } + } +#nullable restore +#else + public List InputFilterGroups { + get { return BackingStore?.Get>("inputFilterGroups"); } + set { BackingStore?.Set("inputFilterGroups", value); } + } +#endif + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// + /// Instantiates a new filter and sets the default values. + /// + public Filter() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static Filter CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new Filter(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"categoryFilterGroups", n => { CategoryFilterGroups = n.GetCollectionOfObjectValues(FilterGroup.CreateFromDiscriminatorValue)?.ToList(); } }, + {"groups", n => { Groups = n.GetCollectionOfObjectValues(FilterGroup.CreateFromDiscriminatorValue)?.ToList(); } }, + {"inputFilterGroups", n => { InputFilterGroups = n.GetCollectionOfObjectValues(FilterGroup.CreateFromDiscriminatorValue)?.ToList(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("categoryFilterGroups", CategoryFilterGroups); + writer.WriteCollectionOfObjectValues("groups", Groups); + writer.WriteCollectionOfObjectValues("inputFilterGroups", InputFilterGroups); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/FilterClause.cs b/src/Microsoft.Graph/Generated/Models/FilterClause.cs new file mode 100644 index 00000000000..6eb22613af3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/FilterClause.cs @@ -0,0 +1,111 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class FilterClause : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The operatorName property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OperatorName { + get { return BackingStore?.Get("operatorName"); } + set { BackingStore?.Set("operatorName", value); } + } +#nullable restore +#else + public string OperatorName { + get { return BackingStore?.Get("operatorName"); } + set { BackingStore?.Set("operatorName", value); } + } +#endif + /// The sourceOperandName property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SourceOperandName { + get { return BackingStore?.Get("sourceOperandName"); } + set { BackingStore?.Set("sourceOperandName", value); } + } +#nullable restore +#else + public string SourceOperandName { + get { return BackingStore?.Get("sourceOperandName"); } + set { BackingStore?.Set("sourceOperandName", value); } + } +#endif + /// The targetOperand property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public FilterOperand? TargetOperand { + get { return BackingStore?.Get("targetOperand"); } + set { BackingStore?.Set("targetOperand", value); } + } +#nullable restore +#else + public FilterOperand TargetOperand { + get { return BackingStore?.Get("targetOperand"); } + set { BackingStore?.Set("targetOperand", value); } + } +#endif + /// + /// Instantiates a new filterClause and sets the default values. + /// + public FilterClause() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static FilterClause CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new FilterClause(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"operatorName", n => { OperatorName = n.GetStringValue(); } }, + {"sourceOperandName", n => { SourceOperandName = n.GetStringValue(); } }, + {"targetOperand", n => { TargetOperand = n.GetObjectValue(FilterOperand.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteStringValue("operatorName", OperatorName); + writer.WriteStringValue("sourceOperandName", SourceOperandName); + writer.WriteObjectValue("targetOperand", TargetOperand); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/FilterGroup.cs b/src/Microsoft.Graph/Generated/Models/FilterGroup.cs new file mode 100644 index 00000000000..6c677e3505c --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/FilterGroup.cs @@ -0,0 +1,95 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class FilterGroup : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The clauses property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Clauses { + get { return BackingStore?.Get?>("clauses"); } + set { BackingStore?.Set("clauses", value); } + } +#nullable restore +#else + public List Clauses { + get { return BackingStore?.Get>("clauses"); } + set { BackingStore?.Set("clauses", value); } + } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { + get { return BackingStore?.Get("name"); } + set { BackingStore?.Set("name", value); } + } +#nullable restore +#else + public string Name { + get { return BackingStore?.Get("name"); } + set { BackingStore?.Set("name", value); } + } +#endif + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// + /// Instantiates a new filterGroup and sets the default values. + /// + public FilterGroup() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static FilterGroup CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new FilterGroup(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"clauses", n => { Clauses = n.GetCollectionOfObjectValues(FilterClause.CreateFromDiscriminatorValue)?.ToList(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("clauses", Clauses); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/FilterOperand.cs b/src/Microsoft.Graph/Generated/Models/FilterOperand.cs new file mode 100644 index 00000000000..4ddd4a02eb8 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/FilterOperand.cs @@ -0,0 +1,79 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class FilterOperand : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The values property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Values { + get { return BackingStore?.Get?>("values"); } + set { BackingStore?.Set("values", value); } + } +#nullable restore +#else + public List Values { + get { return BackingStore?.Get>("values"); } + set { BackingStore?.Set("values", value); } + } +#endif + /// + /// Instantiates a new filterOperand and sets the default values. + /// + public FilterOperand() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static FilterOperand CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new FilterOperand(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"values", n => { Values = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteCollectionOfPrimitiveValues("values", Values); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/FilterOperatorSchema.cs b/src/Microsoft.Graph/Generated/Models/FilterOperatorSchema.cs new file mode 100644 index 00000000000..efda5aa083b --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/FilterOperatorSchema.cs @@ -0,0 +1,62 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class FilterOperatorSchema : Entity, IParsable { + /// The arity property + public ScopeOperatorType? Arity { + get { return BackingStore?.Get("arity"); } + set { BackingStore?.Set("arity", value); } + } + /// The multivaluedComparisonType property + public ScopeOperatorMultiValuedComparisonType? MultivaluedComparisonType { + get { return BackingStore?.Get("multivaluedComparisonType"); } + set { BackingStore?.Set("multivaluedComparisonType", value); } + } + /// The supportedAttributeTypes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SupportedAttributeTypes { + get { return BackingStore?.Get?>("supportedAttributeTypes"); } + set { BackingStore?.Set("supportedAttributeTypes", value); } + } +#nullable restore +#else + public List SupportedAttributeTypes { + get { return BackingStore?.Get>("supportedAttributeTypes"); } + set { BackingStore?.Set("supportedAttributeTypes", value); } + } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static new FilterOperatorSchema CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new FilterOperatorSchema(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"arity", n => { Arity = n.GetEnumValue(); } }, + {"multivaluedComparisonType", n => { MultivaluedComparisonType = n.GetEnumValue(); } }, + {"supportedAttributeTypes", n => { SupportedAttributeTypes = n.GetCollectionOfEnumValues()?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteEnumValue("arity", Arity); + writer.WriteEnumValue("multivaluedComparisonType", MultivaluedComparisonType); + writer.WriteCollectionOfEnumValues("supportedAttributeTypes", SupportedAttributeTypes); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/FilterOperatorSchemaCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/FilterOperatorSchemaCollectionResponse.cs new file mode 100644 index 00000000000..419ddb02b50 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/FilterOperatorSchemaCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class FilterOperatorSchemaCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static new FilterOperatorSchemaCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new FilterOperatorSchemaCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(FilterOperatorSchema.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Group.cs b/src/Microsoft.Graph/Generated/Models/Group.cs index 5c29a442927..caf6c511757 100644 --- a/src/Microsoft.Graph/Generated/Models/Group.cs +++ b/src/Microsoft.Graph/Generated/Models/Group.cs @@ -216,7 +216,7 @@ public List Events { set { BackingStore?.Set("events", value); } } #endif - /// Timestamp of when the group is set to expire. The value cannot be modified and is automatically populated when the group is created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Returned by default. Supports $filter (eq, ne, not, ge, le, in). Read-only. + /// Timestamp of when the group is set to expire. Is null for security groups but for Microsoft 365 groups, it represents when the group is set to expire as defined in the groupLifecyclePolicy. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Returned by default. Supports $filter (eq, ne, not, ge, le, in). Read-only. public DateTimeOffset? ExpirationDateTime { get { return BackingStore?.Get("expirationDateTime"); } set { BackingStore?.Set("expirationDateTime", value); } diff --git a/src/Microsoft.Graph/Generated/Models/GroupFilter.cs b/src/Microsoft.Graph/Generated/Models/GroupFilter.cs new file mode 100644 index 00000000000..1a3cbb7ba5f --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/GroupFilter.cs @@ -0,0 +1,79 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class GroupFilter : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The includedGroups property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? IncludedGroups { + get { return BackingStore?.Get?>("includedGroups"); } + set { BackingStore?.Set("includedGroups", value); } + } +#nullable restore +#else + public List IncludedGroups { + get { return BackingStore?.Get>("includedGroups"); } + set { BackingStore?.Set("includedGroups", value); } + } +#endif + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// + /// Instantiates a new groupFilter and sets the default values. + /// + public GroupFilter() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static GroupFilter CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new GroupFilter(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"includedGroups", n => { IncludedGroups = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("includedGroups", IncludedGroups); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/IosUpdateConfiguration.cs b/src/Microsoft.Graph/Generated/Models/IosUpdateConfiguration.cs index 9754e296686..2bd3b70e79f 100644 --- a/src/Microsoft.Graph/Generated/Models/IosUpdateConfiguration.cs +++ b/src/Microsoft.Graph/Generated/Models/IosUpdateConfiguration.cs @@ -5,9 +5,6 @@ using System.Linq; using System; namespace Microsoft.Graph.Models { - /// - /// IOS Update Configuration, allows you to configure time window within week to install iOS updates - /// public class IosUpdateConfiguration : DeviceConfiguration, IParsable { /// Active Hours End (active hours mean the time window when updates install should not happen) public Time? ActiveHoursEnd { @@ -39,7 +36,7 @@ public int? UtcTimeOffsetInMinutes { set { BackingStore?.Set("utcTimeOffsetInMinutes", value); } } /// - /// Instantiates a new iosUpdateConfiguration and sets the default values. + /// Instantiates a new IosUpdateConfiguration and sets the default values. /// public IosUpdateConfiguration() : base() { OdataType = "#microsoft.graph.iosUpdateConfiguration"; diff --git a/src/Microsoft.Graph/Generated/Models/Mutability.cs b/src/Microsoft.Graph/Generated/Models/Mutability.cs new file mode 100644 index 00000000000..9cf88b44331 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Mutability.cs @@ -0,0 +1,14 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum Mutability { + [EnumMember(Value = "ReadWrite")] + ReadWrite, + [EnumMember(Value = "ReadOnly")] + ReadOnly, + [EnumMember(Value = "Immutable")] + Immutable, + [EnumMember(Value = "WriteOnly")] + WriteOnly, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/ObjectDefinition.cs b/src/Microsoft.Graph/Generated/Models/ObjectDefinition.cs new file mode 100644 index 00000000000..2f0b247bfb3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/ObjectDefinition.cs @@ -0,0 +1,127 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class ObjectDefinition : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// The attributes property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Attributes { + get { return BackingStore?.Get?>("attributes"); } + set { BackingStore?.Set("attributes", value); } + } +#nullable restore +#else + public List Attributes { + get { return BackingStore?.Get>("attributes"); } + set { BackingStore?.Set("attributes", value); } + } +#endif + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The metadata property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Metadata { + get { return BackingStore?.Get?>("metadata"); } + set { BackingStore?.Set("metadata", value); } + } +#nullable restore +#else + public List Metadata { + get { return BackingStore?.Get>("metadata"); } + set { BackingStore?.Set("metadata", value); } + } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { + get { return BackingStore?.Get("name"); } + set { BackingStore?.Set("name", value); } + } +#nullable restore +#else + public string Name { + get { return BackingStore?.Get("name"); } + set { BackingStore?.Set("name", value); } + } +#endif + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The supportedApis property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SupportedApis { + get { return BackingStore?.Get?>("supportedApis"); } + set { BackingStore?.Set("supportedApis", value); } + } +#nullable restore +#else + public List SupportedApis { + get { return BackingStore?.Get>("supportedApis"); } + set { BackingStore?.Set("supportedApis", value); } + } +#endif + /// + /// Instantiates a new objectDefinition and sets the default values. + /// + public ObjectDefinition() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static ObjectDefinition CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ObjectDefinition(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"attributes", n => { Attributes = n.GetCollectionOfObjectValues(AttributeDefinition.CreateFromDiscriminatorValue)?.ToList(); } }, + {"metadata", n => { Metadata = n.GetCollectionOfObjectValues(ObjectDefinitionMetadataEntry.CreateFromDiscriminatorValue)?.ToList(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"supportedApis", n => { SupportedApis = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("attributes", Attributes); + writer.WriteCollectionOfObjectValues("metadata", Metadata); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteCollectionOfPrimitiveValues("supportedApis", SupportedApis); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/ObjectDefinitionMetadata.cs b/src/Microsoft.Graph/Generated/Models/ObjectDefinitionMetadata.cs new file mode 100644 index 00000000000..cb2392335e9 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/ObjectDefinitionMetadata.cs @@ -0,0 +1,20 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum ObjectDefinitionMetadata { + [EnumMember(Value = "PropertyNameAccountEnabled")] + PropertyNameAccountEnabled, + [EnumMember(Value = "PropertyNameSoftDeleted")] + PropertyNameSoftDeleted, + [EnumMember(Value = "IsSoftDeletionSupported")] + IsSoftDeletionSupported, + [EnumMember(Value = "IsSynchronizeAllSupported")] + IsSynchronizeAllSupported, + [EnumMember(Value = "ConnectorDataStorageRequired")] + ConnectorDataStorageRequired, + [EnumMember(Value = "Extensions")] + Extensions, + [EnumMember(Value = "BaseObjectName")] + BaseObjectName, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/ObjectDefinitionMetadataEntry.cs b/src/Microsoft.Graph/Generated/Models/ObjectDefinitionMetadataEntry.cs new file mode 100644 index 00000000000..ebbc843a711 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/ObjectDefinitionMetadataEntry.cs @@ -0,0 +1,86 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class ObjectDefinitionMetadataEntry : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The key property + public ObjectDefinitionMetadata? Key { + get { return BackingStore?.Get("key"); } + set { BackingStore?.Set("key", value); } + } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Value { + get { return BackingStore?.Get("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public string Value { + get { return BackingStore?.Get("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// Instantiates a new objectDefinitionMetadataEntry and sets the default values. + /// + public ObjectDefinitionMetadataEntry() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static ObjectDefinitionMetadataEntry CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ObjectDefinitionMetadataEntry(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"key", n => { Key = n.GetEnumValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"value", n => { Value = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("key", Key); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteStringValue("value", Value); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/ObjectFlowTypes.cs b/src/Microsoft.Graph/Generated/Models/ObjectFlowTypes.cs new file mode 100644 index 00000000000..e9e628241fc --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/ObjectFlowTypes.cs @@ -0,0 +1,14 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum ObjectFlowTypes { + [EnumMember(Value = "None")] + None, + [EnumMember(Value = "Add")] + Add, + [EnumMember(Value = "Update")] + Update, + [EnumMember(Value = "Delete")] + Delete, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/ObjectMapping.cs b/src/Microsoft.Graph/Generated/Models/ObjectMapping.cs new file mode 100644 index 00000000000..76df5c045b1 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/ObjectMapping.cs @@ -0,0 +1,173 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class ObjectMapping : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// The attributeMappings property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? AttributeMappings { + get { return BackingStore?.Get?>("attributeMappings"); } + set { BackingStore?.Set("attributeMappings", value); } + } +#nullable restore +#else + public List AttributeMappings { + get { return BackingStore?.Get>("attributeMappings"); } + set { BackingStore?.Set("attributeMappings", value); } + } +#endif + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The enabled property + public bool? Enabled { + get { return BackingStore?.Get("enabled"); } + set { BackingStore?.Set("enabled", value); } + } + /// The flowTypes property + public ObjectFlowTypes? FlowTypes { + get { return BackingStore?.Get("flowTypes"); } + set { BackingStore?.Set("flowTypes", value); } + } + /// The metadata property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Metadata { + get { return BackingStore?.Get?>("metadata"); } + set { BackingStore?.Set("metadata", value); } + } +#nullable restore +#else + public List Metadata { + get { return BackingStore?.Get>("metadata"); } + set { BackingStore?.Set("metadata", value); } + } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { + get { return BackingStore?.Get("name"); } + set { BackingStore?.Set("name", value); } + } +#nullable restore +#else + public string Name { + get { return BackingStore?.Get("name"); } + set { BackingStore?.Set("name", value); } + } +#endif + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The scope property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Filter? Scope { + get { return BackingStore?.Get("scope"); } + set { BackingStore?.Set("scope", value); } + } +#nullable restore +#else + public Filter Scope { + get { return BackingStore?.Get("scope"); } + set { BackingStore?.Set("scope", value); } + } +#endif + /// The sourceObjectName property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SourceObjectName { + get { return BackingStore?.Get("sourceObjectName"); } + set { BackingStore?.Set("sourceObjectName", value); } + } +#nullable restore +#else + public string SourceObjectName { + get { return BackingStore?.Get("sourceObjectName"); } + set { BackingStore?.Set("sourceObjectName", value); } + } +#endif + /// The targetObjectName property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TargetObjectName { + get { return BackingStore?.Get("targetObjectName"); } + set { BackingStore?.Set("targetObjectName", value); } + } +#nullable restore +#else + public string TargetObjectName { + get { return BackingStore?.Get("targetObjectName"); } + set { BackingStore?.Set("targetObjectName", value); } + } +#endif + /// + /// Instantiates a new objectMapping and sets the default values. + /// + public ObjectMapping() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static ObjectMapping CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ObjectMapping(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"attributeMappings", n => { AttributeMappings = n.GetCollectionOfObjectValues(AttributeMapping.CreateFromDiscriminatorValue)?.ToList(); } }, + {"enabled", n => { Enabled = n.GetBoolValue(); } }, + {"flowTypes", n => { FlowTypes = n.GetEnumValue(); } }, + {"metadata", n => { Metadata = n.GetCollectionOfObjectValues(ObjectMappingMetadataEntry.CreateFromDiscriminatorValue)?.ToList(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"scope", n => { Scope = n.GetObjectValue(Filter.CreateFromDiscriminatorValue); } }, + {"sourceObjectName", n => { SourceObjectName = n.GetStringValue(); } }, + {"targetObjectName", n => { TargetObjectName = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("attributeMappings", AttributeMappings); + writer.WriteBoolValue("enabled", Enabled); + writer.WriteEnumValue("flowTypes", FlowTypes); + writer.WriteCollectionOfObjectValues("metadata", Metadata); + writer.WriteStringValue("name", Name); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteObjectValue("scope", Scope); + writer.WriteStringValue("sourceObjectName", SourceObjectName); + writer.WriteStringValue("targetObjectName", TargetObjectName); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/ObjectMappingMetadata.cs b/src/Microsoft.Graph/Generated/Models/ObjectMappingMetadata.cs new file mode 100644 index 00000000000..d794efab113 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/ObjectMappingMetadata.cs @@ -0,0 +1,20 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum ObjectMappingMetadata { + [EnumMember(Value = "EscrowBehavior")] + EscrowBehavior, + [EnumMember(Value = "DisableMonitoringForChanges")] + DisableMonitoringForChanges, + [EnumMember(Value = "OriginalJoiningProperty")] + OriginalJoiningProperty, + [EnumMember(Value = "Disposition")] + Disposition, + [EnumMember(Value = "IsCustomerDefined")] + IsCustomerDefined, + [EnumMember(Value = "ExcludeFromReporting")] + ExcludeFromReporting, + [EnumMember(Value = "Unsynchronized")] + Unsynchronized, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/ObjectMappingMetadataEntry.cs b/src/Microsoft.Graph/Generated/Models/ObjectMappingMetadataEntry.cs new file mode 100644 index 00000000000..e252725caf8 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/ObjectMappingMetadataEntry.cs @@ -0,0 +1,86 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class ObjectMappingMetadataEntry : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The key property + public ObjectMappingMetadata? Key { + get { return BackingStore?.Get("key"); } + set { BackingStore?.Set("key", value); } + } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Value { + get { return BackingStore?.Get("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public string Value { + get { return BackingStore?.Get("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// Instantiates a new objectMappingMetadataEntry and sets the default values. + /// + public ObjectMappingMetadataEntry() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static ObjectMappingMetadataEntry CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ObjectMappingMetadataEntry(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"key", n => { Key = n.GetEnumValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"value", n => { Value = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("key", Key); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteStringValue("value", Value); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/OnlineMeetingContentSharingDisabledReason.cs b/src/Microsoft.Graph/Generated/Models/OnlineMeetingContentSharingDisabledReason.cs new file mode 100644 index 00000000000..ee5fa7314af --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/OnlineMeetingContentSharingDisabledReason.cs @@ -0,0 +1,10 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum OnlineMeetingContentSharingDisabledReason { + [EnumMember(Value = "watermarkProtection")] + WatermarkProtection, + [EnumMember(Value = "unknownFutureValue")] + UnknownFutureValue, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/OnlineMeetingRestricted.cs b/src/Microsoft.Graph/Generated/Models/OnlineMeetingRestricted.cs new file mode 100644 index 00000000000..20aff41099c --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/OnlineMeetingRestricted.cs @@ -0,0 +1,77 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class OnlineMeetingRestricted : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// Specifies the reason shared content from this participant is disabled. Possible values are: watermarkProtection, unknownFutureValue. + public OnlineMeetingContentSharingDisabledReason? ContentSharingDisabled { + get { return BackingStore?.Get("contentSharingDisabled"); } + set { BackingStore?.Set("contentSharingDisabled", value); } + } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// Specifies the reason video from this participant is disabled. Possible values are: watermarkProtection, unknownFutureValue. + public OnlineMeetingVideoDisabledReason? VideoDisabled { + get { return BackingStore?.Get("videoDisabled"); } + set { BackingStore?.Set("videoDisabled", value); } + } + /// + /// Instantiates a new onlineMeetingRestricted and sets the default values. + /// + public OnlineMeetingRestricted() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static OnlineMeetingRestricted CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new OnlineMeetingRestricted(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"contentSharingDisabled", n => { ContentSharingDisabled = n.GetEnumValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"videoDisabled", n => { VideoDisabled = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("contentSharingDisabled", ContentSharingDisabled); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteEnumValue("videoDisabled", VideoDisabled); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/OnlineMeetingVideoDisabledReason.cs b/src/Microsoft.Graph/Generated/Models/OnlineMeetingVideoDisabledReason.cs new file mode 100644 index 00000000000..18628d162fe --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/OnlineMeetingVideoDisabledReason.cs @@ -0,0 +1,10 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum OnlineMeetingVideoDisabledReason { + [EnumMember(Value = "watermarkProtection")] + WatermarkProtection, + [EnumMember(Value = "unknownFutureValue")] + UnknownFutureValue, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/OutlookCategory.cs b/src/Microsoft.Graph/Generated/Models/OutlookCategory.cs index aff6855f56e..4a352ae64ff 100644 --- a/src/Microsoft.Graph/Generated/Models/OutlookCategory.cs +++ b/src/Microsoft.Graph/Generated/Models/OutlookCategory.cs @@ -5,7 +5,7 @@ using System; namespace Microsoft.Graph.Models { public class OutlookCategory : Entity, IParsable { - /// A pre-set color constant that characterizes a category, and that is mapped to one of 25 predefined colors. See the note below. + /// A pre-set color constant that characterizes a category, and that is mapped to one of 25 predefined colors. For more details, see the following note. public CategoryColor? Color { get { return BackingStore?.Get("color"); } set { BackingStore?.Set("color", value); } diff --git a/src/Microsoft.Graph/Generated/Models/ParseExpressionResponse.cs b/src/Microsoft.Graph/Generated/Models/ParseExpressionResponse.cs new file mode 100644 index 00000000000..985d50909f6 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/ParseExpressionResponse.cs @@ -0,0 +1,125 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class ParseExpressionResponse : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The error property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public PublicError? Error { + get { return BackingStore?.Get("error"); } + set { BackingStore?.Set("error", value); } + } +#nullable restore +#else + public PublicError Error { + get { return BackingStore?.Get("error"); } + set { BackingStore?.Set("error", value); } + } +#endif + /// The evaluationResult property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? EvaluationResult { + get { return BackingStore?.Get?>("evaluationResult"); } + set { BackingStore?.Set("evaluationResult", value); } + } +#nullable restore +#else + public List EvaluationResult { + get { return BackingStore?.Get>("evaluationResult"); } + set { BackingStore?.Set("evaluationResult", value); } + } +#endif + /// The evaluationSucceeded property + public bool? EvaluationSucceeded { + get { return BackingStore?.Get("evaluationSucceeded"); } + set { BackingStore?.Set("evaluationSucceeded", value); } + } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The parsedExpression property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public AttributeMappingSource? ParsedExpression { + get { return BackingStore?.Get("parsedExpression"); } + set { BackingStore?.Set("parsedExpression", value); } + } +#nullable restore +#else + public AttributeMappingSource ParsedExpression { + get { return BackingStore?.Get("parsedExpression"); } + set { BackingStore?.Set("parsedExpression", value); } + } +#endif + /// The parsingSucceeded property + public bool? ParsingSucceeded { + get { return BackingStore?.Get("parsingSucceeded"); } + set { BackingStore?.Set("parsingSucceeded", value); } + } + /// + /// Instantiates a new parseExpressionResponse and sets the default values. + /// + public ParseExpressionResponse() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static ParseExpressionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ParseExpressionResponse(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"error", n => { Error = n.GetObjectValue(PublicError.CreateFromDiscriminatorValue); } }, + {"evaluationResult", n => { EvaluationResult = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, + {"evaluationSucceeded", n => { EvaluationSucceeded = n.GetBoolValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"parsedExpression", n => { ParsedExpression = n.GetObjectValue(AttributeMappingSource.CreateFromDiscriminatorValue); } }, + {"parsingSucceeded", n => { ParsingSucceeded = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("error", Error); + writer.WriteCollectionOfPrimitiveValues("evaluationResult", EvaluationResult); + writer.WriteBoolValue("evaluationSucceeded", EvaluationSucceeded); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteObjectValue("parsedExpression", ParsedExpression); + writer.WriteBoolValue("parsingSucceeded", ParsingSucceeded); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/Participant.cs b/src/Microsoft.Graph/Generated/Models/Participant.cs index 43c1570569b..eec38b9236b 100644 --- a/src/Microsoft.Graph/Generated/Models/Participant.cs +++ b/src/Microsoft.Graph/Generated/Models/Participant.cs @@ -70,6 +70,20 @@ public Microsoft.Graph.Models.RecordingInfo RecordingInfo { get { return BackingStore?.Get("recordingInfo"); } set { BackingStore?.Set("recordingInfo", value); } } +#endif + /// Indicates the reason or reasons media content from this participant is restricted. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public OnlineMeetingRestricted? RestrictedExperience { + get { return BackingStore?.Get("restrictedExperience"); } + set { BackingStore?.Set("restrictedExperience", value); } + } +#nullable restore +#else + public OnlineMeetingRestricted RestrictedExperience { + get { return BackingStore?.Get("restrictedExperience"); } + set { BackingStore?.Set("restrictedExperience", value); } + } #endif /// /// Creates a new instance of the appropriate class based on discriminator value @@ -90,6 +104,7 @@ public Microsoft.Graph.Models.RecordingInfo RecordingInfo { {"mediaStreams", n => { MediaStreams = n.GetCollectionOfObjectValues(MediaStream.CreateFromDiscriminatorValue)?.ToList(); } }, {"metadata", n => { Metadata = n.GetStringValue(); } }, {"recordingInfo", n => { RecordingInfo = n.GetObjectValue(Microsoft.Graph.Models.RecordingInfo.CreateFromDiscriminatorValue); } }, + {"restrictedExperience", n => { RestrictedExperience = n.GetObjectValue(OnlineMeetingRestricted.CreateFromDiscriminatorValue); } }, }; } /// @@ -105,6 +120,7 @@ public Microsoft.Graph.Models.RecordingInfo RecordingInfo { writer.WriteCollectionOfObjectValues("mediaStreams", MediaStreams); writer.WriteStringValue("metadata", Metadata); writer.WriteObjectValue("recordingInfo", RecordingInfo); + writer.WriteObjectValue("restrictedExperience", RestrictedExperience); } } } diff --git a/src/Microsoft.Graph/Generated/Models/QuarantineReason.cs b/src/Microsoft.Graph/Generated/Models/QuarantineReason.cs new file mode 100644 index 00000000000..c268fce94ae --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/QuarantineReason.cs @@ -0,0 +1,22 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum QuarantineReason { + [EnumMember(Value = "EncounteredBaseEscrowThreshold")] + EncounteredBaseEscrowThreshold, + [EnumMember(Value = "EncounteredTotalEscrowThreshold")] + EncounteredTotalEscrowThreshold, + [EnumMember(Value = "EncounteredEscrowProportionThreshold")] + EncounteredEscrowProportionThreshold, + [EnumMember(Value = "EncounteredQuarantineException")] + EncounteredQuarantineException, + [EnumMember(Value = "Unknown")] + Unknown, + [EnumMember(Value = "QuarantinedOnDemand")] + QuarantinedOnDemand, + [EnumMember(Value = "TooManyDeletes")] + TooManyDeletes, + [EnumMember(Value = "IngestionInterrupted")] + IngestionInterrupted, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/ReferencedObject.cs b/src/Microsoft.Graph/Generated/Models/ReferencedObject.cs new file mode 100644 index 00000000000..1028248eb64 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/ReferencedObject.cs @@ -0,0 +1,95 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class ReferencedObject : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The referencedObjectName property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReferencedObjectName { + get { return BackingStore?.Get("referencedObjectName"); } + set { BackingStore?.Set("referencedObjectName", value); } + } +#nullable restore +#else + public string ReferencedObjectName { + get { return BackingStore?.Get("referencedObjectName"); } + set { BackingStore?.Set("referencedObjectName", value); } + } +#endif + /// The referencedProperty property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReferencedProperty { + get { return BackingStore?.Get("referencedProperty"); } + set { BackingStore?.Set("referencedProperty", value); } + } +#nullable restore +#else + public string ReferencedProperty { + get { return BackingStore?.Get("referencedProperty"); } + set { BackingStore?.Set("referencedProperty", value); } + } +#endif + /// + /// Instantiates a new referencedObject and sets the default values. + /// + public ReferencedObject() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static ReferencedObject CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ReferencedObject(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"referencedObjectName", n => { ReferencedObjectName = n.GetStringValue(); } }, + {"referencedProperty", n => { ReferencedProperty = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteStringValue("referencedObjectName", ReferencedObjectName); + writer.WriteStringValue("referencedProperty", ReferencedProperty); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/RoleDefinition.cs b/src/Microsoft.Graph/Generated/Models/RoleDefinition.cs index b80be29c142..9f0b1934e16 100644 --- a/src/Microsoft.Graph/Generated/Models/RoleDefinition.cs +++ b/src/Microsoft.Graph/Generated/Models/RoleDefinition.cs @@ -4,9 +4,6 @@ using System.Linq; using System; namespace Microsoft.Graph.Models { - /// - /// The Role Definition resource. The role definition is the foundation of role based access in Intune. The role combines an Intune resource such as a Mobile App and associated role permissions such as Create or Read for the resource. There are two types of roles, built-in and custom. Built-in roles cannot be modified. Both built-in roles and custom roles must have assignments to be enforced. Create custom roles if you want to define a role that allows any of the available resources and role permissions to be combined into a single role. - /// public class RoleDefinition : Entity, IParsable { /// Description of the Role definition. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER diff --git a/src/Microsoft.Graph/Generated/Models/ScopeOperatorMultiValuedComparisonType.cs b/src/Microsoft.Graph/Generated/Models/ScopeOperatorMultiValuedComparisonType.cs new file mode 100644 index 00000000000..e0796c12182 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/ScopeOperatorMultiValuedComparisonType.cs @@ -0,0 +1,10 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum ScopeOperatorMultiValuedComparisonType { + [EnumMember(Value = "All")] + All, + [EnumMember(Value = "Any")] + Any, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/ScopeOperatorType.cs b/src/Microsoft.Graph/Generated/Models/ScopeOperatorType.cs new file mode 100644 index 00000000000..4fcad39190a --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/ScopeOperatorType.cs @@ -0,0 +1,10 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum ScopeOperatorType { + [EnumMember(Value = "Binary")] + Binary, + [EnumMember(Value = "Unary")] + Unary, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/SearchHit.cs b/src/Microsoft.Graph/Generated/Models/SearchHit.cs index 91412d4aa6f..c83c7b6d7bf 100644 --- a/src/Microsoft.Graph/Generated/Models/SearchHit.cs +++ b/src/Microsoft.Graph/Generated/Models/SearchHit.cs @@ -41,6 +41,11 @@ public string HitId { set { BackingStore?.Set("hitId", value); } } #endif + /// The isCollapsed property + public bool? IsCollapsed { + get { return BackingStore?.Get("isCollapsed"); } + set { BackingStore?.Set("isCollapsed", value); } + } /// The OdataType property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -124,6 +129,7 @@ public IDictionary> GetFieldDeserializers() { return new Dictionary> { {"contentSource", n => { ContentSource = n.GetStringValue(); } }, {"hitId", n => { HitId = n.GetStringValue(); } }, + {"isCollapsed", n => { IsCollapsed = n.GetBoolValue(); } }, {"@odata.type", n => { OdataType = n.GetStringValue(); } }, {"rank", n => { Rank = n.GetIntValue(); } }, {"resource", n => { Resource = n.GetObjectValue(Entity.CreateFromDiscriminatorValue); } }, @@ -139,6 +145,7 @@ public void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("contentSource", ContentSource); writer.WriteStringValue("hitId", HitId); + writer.WriteBoolValue("isCollapsed", IsCollapsed); writer.WriteStringValue("@odata.type", OdataType); writer.WriteIntValue("rank", Rank); writer.WriteObjectValue("resource", Resource); diff --git a/src/Microsoft.Graph/Generated/Models/SearchRequest.cs b/src/Microsoft.Graph/Generated/Models/SearchRequest.cs index f89662b03d9..392d6e2de6a 100644 --- a/src/Microsoft.Graph/Generated/Models/SearchRequest.cs +++ b/src/Microsoft.Graph/Generated/Models/SearchRequest.cs @@ -41,6 +41,20 @@ public List Aggregations { #endif /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The collapseProperties property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? CollapseProperties { + get { return BackingStore?.Get?>("collapseProperties"); } + set { BackingStore?.Set("collapseProperties", value); } + } +#nullable restore +#else + public List CollapseProperties { + get { return BackingStore?.Get>("collapseProperties"); } + set { BackingStore?.Set("collapseProperties", value); } + } +#endif /// The contentSources property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -218,6 +232,7 @@ public IDictionary> GetFieldDeserializers() { return new Dictionary> { {"aggregationFilters", n => { AggregationFilters = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, {"aggregations", n => { Aggregations = n.GetCollectionOfObjectValues(AggregationOption.CreateFromDiscriminatorValue)?.ToList(); } }, + {"collapseProperties", n => { CollapseProperties = n.GetCollectionOfObjectValues(CollapseProperty.CreateFromDiscriminatorValue)?.ToList(); } }, {"contentSources", n => { ContentSources = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, {"enableTopResults", n => { EnableTopResults = n.GetBoolValue(); } }, {"entityTypes", n => { EntityTypes = n.GetCollectionOfEnumValues()?.ToList(); } }, @@ -241,6 +256,7 @@ public void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("aggregationFilters", AggregationFilters); writer.WriteCollectionOfObjectValues("aggregations", Aggregations); + writer.WriteCollectionOfObjectValues("collapseProperties", CollapseProperties); writer.WriteCollectionOfPrimitiveValues("contentSources", ContentSources); writer.WriteBoolValue("enableTopResults", EnableTopResults); writer.WriteCollectionOfEnumValues("entityTypes", EntityTypes); diff --git a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryNoncustodialDataSource.cs b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryNoncustodialDataSource.cs index 65ddda85e44..d7125fed292 100644 --- a/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryNoncustodialDataSource.cs +++ b/src/Microsoft.Graph/Generated/Models/Security/EdiscoveryNoncustodialDataSource.cs @@ -34,7 +34,7 @@ public EdiscoveryIndexOperation LastIndexOperation { } #endif /// - /// Instantiates a new ediscoveryNoncustodialDataSource and sets the default values. + /// Instantiates a new EdiscoveryNoncustodialDataSource and sets the default values. /// public EdiscoveryNoncustodialDataSource() : base() { OdataType = "#microsoft.graph.security.ediscoveryNoncustodialDataSource"; diff --git a/src/Microsoft.Graph/Generated/Models/ServicePrincipal.cs b/src/Microsoft.Graph/Generated/Models/ServicePrincipal.cs index 1660871e3d8..aafe3fc2f44 100644 --- a/src/Microsoft.Graph/Generated/Models/ServicePrincipal.cs +++ b/src/Microsoft.Graph/Generated/Models/ServicePrincipal.cs @@ -579,6 +579,20 @@ public string SignInAudience { get { return BackingStore?.Get("signInAudience"); } set { BackingStore?.Set("signInAudience", value); } } +#endif + /// The synchronization property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Models.Synchronization? Synchronization { + get { return BackingStore?.Get("synchronization"); } + set { BackingStore?.Set("synchronization", value); } + } +#nullable restore +#else + public Microsoft.Graph.Models.Synchronization Synchronization { + get { return BackingStore?.Get("synchronization"); } + set { BackingStore?.Set("synchronization", value); } + } #endif /// Custom strings that can be used to categorize and identify the service principal. Not nullable. The value is the union of strings set here and on the associated application entity's tags property.Supports $filter (eq, not, ge, le, startsWith). #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -717,6 +731,7 @@ public ServicePrincipal() : base() { {"servicePrincipalNames", n => { ServicePrincipalNames = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, {"servicePrincipalType", n => { ServicePrincipalType = n.GetStringValue(); } }, {"signInAudience", n => { SignInAudience = n.GetStringValue(); } }, + {"synchronization", n => { Synchronization = n.GetObjectValue(Microsoft.Graph.Models.Synchronization.CreateFromDiscriminatorValue); } }, {"tags", n => { Tags = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, {"tokenEncryptionKeyId", n => { TokenEncryptionKeyId = n.GetGuidValue(); } }, {"tokenIssuancePolicies", n => { TokenIssuancePolicies = n.GetCollectionOfObjectValues(TokenIssuancePolicy.CreateFromDiscriminatorValue)?.ToList(); } }, @@ -775,6 +790,7 @@ public ServicePrincipal() : base() { writer.WriteCollectionOfPrimitiveValues("servicePrincipalNames", ServicePrincipalNames); writer.WriteStringValue("servicePrincipalType", ServicePrincipalType); writer.WriteStringValue("signInAudience", SignInAudience); + writer.WriteObjectValue("synchronization", Synchronization); writer.WriteCollectionOfPrimitiveValues("tags", Tags); writer.WriteGuidValue("tokenEncryptionKeyId", TokenEncryptionKeyId); writer.WriteCollectionOfObjectValues("tokenIssuancePolicies", TokenIssuancePolicies); diff --git a/src/Microsoft.Graph/Generated/Models/StringKeyAttributeMappingSourceValuePair.cs b/src/Microsoft.Graph/Generated/Models/StringKeyAttributeMappingSourceValuePair.cs new file mode 100644 index 00000000000..4ccd9e7f9c3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/StringKeyAttributeMappingSourceValuePair.cs @@ -0,0 +1,95 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class StringKeyAttributeMappingSourceValuePair : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The key property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Key { + get { return BackingStore?.Get("key"); } + set { BackingStore?.Set("key", value); } + } +#nullable restore +#else + public string Key { + get { return BackingStore?.Get("key"); } + set { BackingStore?.Set("key", value); } + } +#endif + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public AttributeMappingSource? Value { + get { return BackingStore?.Get("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public AttributeMappingSource Value { + get { return BackingStore?.Get("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// Instantiates a new stringKeyAttributeMappingSourceValuePair and sets the default values. + /// + public StringKeyAttributeMappingSourceValuePair() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static StringKeyAttributeMappingSourceValuePair CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new StringKeyAttributeMappingSourceValuePair(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"key", n => { Key = n.GetStringValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"value", n => { Value = n.GetObjectValue(AttributeMappingSource.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("key", Key); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteObjectValue("value", Value); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/StringKeyLongValuePair.cs b/src/Microsoft.Graph/Generated/Models/StringKeyLongValuePair.cs new file mode 100644 index 00000000000..08b2e0cc703 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/StringKeyLongValuePair.cs @@ -0,0 +1,86 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class StringKeyLongValuePair : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The key property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Key { + get { return BackingStore?.Get("key"); } + set { BackingStore?.Set("key", value); } + } +#nullable restore +#else + public string Key { + get { return BackingStore?.Get("key"); } + set { BackingStore?.Set("key", value); } + } +#endif + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The value property + public long? Value { + get { return BackingStore?.Get("value"); } + set { BackingStore?.Set("value", value); } + } + /// + /// Instantiates a new stringKeyLongValuePair and sets the default values. + /// + public StringKeyLongValuePair() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static StringKeyLongValuePair CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new StringKeyLongValuePair(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"key", n => { Key = n.GetStringValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"value", n => { Value = n.GetLongValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("key", Key); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteLongValue("value", Value); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/StringKeyObjectValuePair.cs b/src/Microsoft.Graph/Generated/Models/StringKeyObjectValuePair.cs new file mode 100644 index 00000000000..220efae8c65 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/StringKeyObjectValuePair.cs @@ -0,0 +1,79 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class StringKeyObjectValuePair : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The key property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Key { + get { return BackingStore?.Get("key"); } + set { BackingStore?.Set("key", value); } + } +#nullable restore +#else + public string Key { + get { return BackingStore?.Get("key"); } + set { BackingStore?.Set("key", value); } + } +#endif + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// + /// Instantiates a new stringKeyObjectValuePair and sets the default values. + /// + public StringKeyObjectValuePair() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static StringKeyObjectValuePair CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new StringKeyObjectValuePair(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"key", n => { Key = n.GetStringValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("key", Key); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/StringKeyStringValuePair.cs b/src/Microsoft.Graph/Generated/Models/StringKeyStringValuePair.cs new file mode 100644 index 00000000000..f1f738c6774 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/StringKeyStringValuePair.cs @@ -0,0 +1,95 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class StringKeyStringValuePair : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The key property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Key { + get { return BackingStore?.Get("key"); } + set { BackingStore?.Set("key", value); } + } +#nullable restore +#else + public string Key { + get { return BackingStore?.Get("key"); } + set { BackingStore?.Set("key", value); } + } +#endif + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Value { + get { return BackingStore?.Get("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public string Value { + get { return BackingStore?.Get("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// Instantiates a new stringKeyStringValuePair and sets the default values. + /// + public StringKeyStringValuePair() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static StringKeyStringValuePair CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new StringKeyStringValuePair(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"key", n => { Key = n.GetStringValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"value", n => { Value = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("key", Key); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteStringValue("value", Value); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/SubscribedSku.cs b/src/Microsoft.Graph/Generated/Models/SubscribedSku.cs index bd453270b00..e3408d77396 100644 --- a/src/Microsoft.Graph/Generated/Models/SubscribedSku.cs +++ b/src/Microsoft.Graph/Generated/Models/SubscribedSku.cs @@ -5,6 +5,34 @@ using System; namespace Microsoft.Graph.Models { public class SubscribedSku : Entity, IParsable { + /// The accountId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AccountId { + get { return BackingStore?.Get("accountId"); } + set { BackingStore?.Set("accountId", value); } + } +#nullable restore +#else + public string AccountId { + get { return BackingStore?.Get("accountId"); } + set { BackingStore?.Set("accountId", value); } + } +#endif + /// The accountName property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AccountName { + get { return BackingStore?.Get("accountName"); } + set { BackingStore?.Set("accountName", value); } + } +#nullable restore +#else + public string AccountName { + get { return BackingStore?.Get("accountName"); } + set { BackingStore?.Set("accountName", value); } + } +#endif /// For example, 'User' or 'Company'. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -84,6 +112,20 @@ public string SkuPartNumber { get { return BackingStore?.Get("skuPartNumber"); } set { BackingStore?.Set("skuPartNumber", value); } } +#endif + /// The subscriptionIds property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SubscriptionIds { + get { return BackingStore?.Get?>("subscriptionIds"); } + set { BackingStore?.Set("subscriptionIds", value); } + } +#nullable restore +#else + public List SubscriptionIds { + get { return BackingStore?.Get>("subscriptionIds"); } + set { BackingStore?.Set("subscriptionIds", value); } + } #endif /// /// Creates a new instance of the appropriate class based on discriminator value @@ -98,6 +140,8 @@ public string SkuPartNumber { /// public new IDictionary> GetFieldDeserializers() { return new Dictionary>(base.GetFieldDeserializers()) { + {"accountId", n => { AccountId = n.GetStringValue(); } }, + {"accountName", n => { AccountName = n.GetStringValue(); } }, {"appliesTo", n => { AppliesTo = n.GetStringValue(); } }, {"capabilityStatus", n => { CapabilityStatus = n.GetStringValue(); } }, {"consumedUnits", n => { ConsumedUnits = n.GetIntValue(); } }, @@ -105,6 +149,7 @@ public string SkuPartNumber { {"servicePlans", n => { ServicePlans = n.GetCollectionOfObjectValues(ServicePlanInfo.CreateFromDiscriminatorValue)?.ToList(); } }, {"skuId", n => { SkuId = n.GetGuidValue(); } }, {"skuPartNumber", n => { SkuPartNumber = n.GetStringValue(); } }, + {"subscriptionIds", n => { SubscriptionIds = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, }; } /// @@ -114,6 +159,8 @@ public string SkuPartNumber { public new void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); base.Serialize(writer); + writer.WriteStringValue("accountId", AccountId); + writer.WriteStringValue("accountName", AccountName); writer.WriteStringValue("appliesTo", AppliesTo); writer.WriteStringValue("capabilityStatus", CapabilityStatus); writer.WriteIntValue("consumedUnits", ConsumedUnits); @@ -121,6 +168,7 @@ public string SkuPartNumber { writer.WriteCollectionOfObjectValues("servicePlans", ServicePlans); writer.WriteGuidValue("skuId", SkuId); writer.WriteStringValue("skuPartNumber", SkuPartNumber); + writer.WriteCollectionOfPrimitiveValues("subscriptionIds", SubscriptionIds); } } } diff --git a/src/Microsoft.Graph/Generated/Models/Synchronization.cs b/src/Microsoft.Graph/Generated/Models/Synchronization.cs new file mode 100644 index 00000000000..093f78d55de --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/Synchronization.cs @@ -0,0 +1,80 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class Synchronization : Entity, IParsable { + /// The jobs property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Jobs { + get { return BackingStore?.Get?>("jobs"); } + set { BackingStore?.Set("jobs", value); } + } +#nullable restore +#else + public List Jobs { + get { return BackingStore?.Get>("jobs"); } + set { BackingStore?.Set("jobs", value); } + } +#endif + /// The secrets property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Secrets { + get { return BackingStore?.Get?>("secrets"); } + set { BackingStore?.Set("secrets", value); } + } +#nullable restore +#else + public List Secrets { + get { return BackingStore?.Get>("secrets"); } + set { BackingStore?.Set("secrets", value); } + } +#endif + /// The templates property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Templates { + get { return BackingStore?.Get?>("templates"); } + set { BackingStore?.Set("templates", value); } + } +#nullable restore +#else + public List Templates { + get { return BackingStore?.Get>("templates"); } + set { BackingStore?.Set("templates", value); } + } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static new Synchronization CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new Synchronization(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"jobs", n => { Jobs = n.GetCollectionOfObjectValues(SynchronizationJob.CreateFromDiscriminatorValue)?.ToList(); } }, + {"secrets", n => { Secrets = n.GetCollectionOfObjectValues(SynchronizationSecretKeyStringValuePair.CreateFromDiscriminatorValue)?.ToList(); } }, + {"templates", n => { Templates = n.GetCollectionOfObjectValues(SynchronizationTemplate.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("jobs", Jobs); + writer.WriteCollectionOfObjectValues("secrets", Secrets); + writer.WriteCollectionOfObjectValues("templates", Templates); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationError.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationError.cs new file mode 100644 index 00000000000..0f8d7f3bfff --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationError.cs @@ -0,0 +1,102 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class SynchronizationError : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { + get { return BackingStore?.Get("code"); } + set { BackingStore?.Set("code", value); } + } +#nullable restore +#else + public string Code { + get { return BackingStore?.Get("code"); } + set { BackingStore?.Set("code", value); } + } +#endif + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Message { + get { return BackingStore?.Get("message"); } + set { BackingStore?.Set("message", value); } + } +#nullable restore +#else + public string Message { + get { return BackingStore?.Get("message"); } + set { BackingStore?.Set("message", value); } + } +#endif + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The tenantActionable property + public bool? TenantActionable { + get { return BackingStore?.Get("tenantActionable"); } + set { BackingStore?.Set("tenantActionable", value); } + } + /// + /// Instantiates a new synchronizationError and sets the default values. + /// + public SynchronizationError() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static SynchronizationError CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new SynchronizationError(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"code", n => { Code = n.GetStringValue(); } }, + {"message", n => { Message = n.GetStringValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"tenantActionable", n => { TenantActionable = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("code", Code); + writer.WriteStringValue("message", Message); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteBoolValue("tenantActionable", TenantActionable); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationJob.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationJob.cs new file mode 100644 index 00000000000..7a859f04fbe --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationJob.cs @@ -0,0 +1,112 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class SynchronizationJob : Entity, IParsable { + /// The schedule property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public SynchronizationSchedule? Schedule { + get { return BackingStore?.Get("schedule"); } + set { BackingStore?.Set("schedule", value); } + } +#nullable restore +#else + public SynchronizationSchedule Schedule { + get { return BackingStore?.Get("schedule"); } + set { BackingStore?.Set("schedule", value); } + } +#endif + /// The schema property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public SynchronizationSchema? Schema { + get { return BackingStore?.Get("schema"); } + set { BackingStore?.Set("schema", value); } + } +#nullable restore +#else + public SynchronizationSchema Schema { + get { return BackingStore?.Get("schema"); } + set { BackingStore?.Set("schema", value); } + } +#endif + /// The status property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public SynchronizationStatus? Status { + get { return BackingStore?.Get("status"); } + set { BackingStore?.Set("status", value); } + } +#nullable restore +#else + public SynchronizationStatus Status { + get { return BackingStore?.Get("status"); } + set { BackingStore?.Set("status", value); } + } +#endif + /// The synchronizationJobSettings property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SynchronizationJobSettings { + get { return BackingStore?.Get?>("synchronizationJobSettings"); } + set { BackingStore?.Set("synchronizationJobSettings", value); } + } +#nullable restore +#else + public List SynchronizationJobSettings { + get { return BackingStore?.Get>("synchronizationJobSettings"); } + set { BackingStore?.Set("synchronizationJobSettings", value); } + } +#endif + /// The templateId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TemplateId { + get { return BackingStore?.Get("templateId"); } + set { BackingStore?.Set("templateId", value); } + } +#nullable restore +#else + public string TemplateId { + get { return BackingStore?.Get("templateId"); } + set { BackingStore?.Set("templateId", value); } + } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static new SynchronizationJob CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new SynchronizationJob(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"schedule", n => { Schedule = n.GetObjectValue(SynchronizationSchedule.CreateFromDiscriminatorValue); } }, + {"schema", n => { Schema = n.GetObjectValue(SynchronizationSchema.CreateFromDiscriminatorValue); } }, + {"status", n => { Status = n.GetObjectValue(SynchronizationStatus.CreateFromDiscriminatorValue); } }, + {"synchronizationJobSettings", n => { SynchronizationJobSettings = n.GetCollectionOfObjectValues(KeyValuePair.CreateFromDiscriminatorValue)?.ToList(); } }, + {"templateId", n => { TemplateId = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteObjectValue("schedule", Schedule); + writer.WriteObjectValue("schema", Schema); + writer.WriteObjectValue("status", Status); + writer.WriteCollectionOfObjectValues("synchronizationJobSettings", SynchronizationJobSettings); + writer.WriteStringValue("templateId", TemplateId); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationJobApplicationParameters.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationJobApplicationParameters.cs new file mode 100644 index 00000000000..a1033e71004 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationJobApplicationParameters.cs @@ -0,0 +1,95 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class SynchronizationJobApplicationParameters : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The ruleId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RuleId { + get { return BackingStore?.Get("ruleId"); } + set { BackingStore?.Set("ruleId", value); } + } +#nullable restore +#else + public string RuleId { + get { return BackingStore?.Get("ruleId"); } + set { BackingStore?.Set("ruleId", value); } + } +#endif + /// The subjects property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Subjects { + get { return BackingStore?.Get?>("subjects"); } + set { BackingStore?.Set("subjects", value); } + } +#nullable restore +#else + public List Subjects { + get { return BackingStore?.Get>("subjects"); } + set { BackingStore?.Set("subjects", value); } + } +#endif + /// + /// Instantiates a new synchronizationJobApplicationParameters and sets the default values. + /// + public SynchronizationJobApplicationParameters() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static SynchronizationJobApplicationParameters CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new SynchronizationJobApplicationParameters(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"ruleId", n => { RuleId = n.GetStringValue(); } }, + {"subjects", n => { Subjects = n.GetCollectionOfObjectValues(SynchronizationJobSubject.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteStringValue("ruleId", RuleId); + writer.WriteCollectionOfObjectValues("subjects", Subjects); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationJobCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationJobCollectionResponse.cs new file mode 100644 index 00000000000..34babbb1490 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationJobCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class SynchronizationJobCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static new SynchronizationJobCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new SynchronizationJobCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(SynchronizationJob.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationJobRestartCriteria.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationJobRestartCriteria.cs new file mode 100644 index 00000000000..77ba3a952dc --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationJobRestartCriteria.cs @@ -0,0 +1,70 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class SynchronizationJobRestartCriteria : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The resetScope property + public SynchronizationJobRestartScope? ResetScope { + get { return BackingStore?.Get("resetScope"); } + set { BackingStore?.Set("resetScope", value); } + } + /// + /// Instantiates a new synchronizationJobRestartCriteria and sets the default values. + /// + public SynchronizationJobRestartCriteria() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static SynchronizationJobRestartCriteria CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new SynchronizationJobRestartCriteria(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"resetScope", n => { ResetScope = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteEnumValue("resetScope", ResetScope); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationJobRestartScope.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationJobRestartScope.cs new file mode 100644 index 00000000000..10d1f8f356a --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationJobRestartScope.cs @@ -0,0 +1,20 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum SynchronizationJobRestartScope { + [EnumMember(Value = "None")] + None, + [EnumMember(Value = "ConnectorDataStore")] + ConnectorDataStore, + [EnumMember(Value = "Escrows")] + Escrows, + [EnumMember(Value = "Watermark")] + Watermark, + [EnumMember(Value = "QuarantineState")] + QuarantineState, + [EnumMember(Value = "Full")] + Full, + [EnumMember(Value = "ForceDeletes")] + ForceDeletes, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationJobSubject.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationJobSubject.cs new file mode 100644 index 00000000000..cb087c4e8ee --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationJobSubject.cs @@ -0,0 +1,111 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class SynchronizationJobSubject : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The links property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public SynchronizationLinkedObjects? Links { + get { return BackingStore?.Get("links"); } + set { BackingStore?.Set("links", value); } + } +#nullable restore +#else + public SynchronizationLinkedObjects Links { + get { return BackingStore?.Get("links"); } + set { BackingStore?.Set("links", value); } + } +#endif + /// The objectId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ObjectId { + get { return BackingStore?.Get("objectId"); } + set { BackingStore?.Set("objectId", value); } + } +#nullable restore +#else + public string ObjectId { + get { return BackingStore?.Get("objectId"); } + set { BackingStore?.Set("objectId", value); } + } +#endif + /// The objectTypeName property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ObjectTypeName { + get { return BackingStore?.Get("objectTypeName"); } + set { BackingStore?.Set("objectTypeName", value); } + } +#nullable restore +#else + public string ObjectTypeName { + get { return BackingStore?.Get("objectTypeName"); } + set { BackingStore?.Set("objectTypeName", value); } + } +#endif + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// + /// Instantiates a new synchronizationJobSubject and sets the default values. + /// + public SynchronizationJobSubject() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static SynchronizationJobSubject CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new SynchronizationJobSubject(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"links", n => { Links = n.GetObjectValue(SynchronizationLinkedObjects.CreateFromDiscriminatorValue); } }, + {"objectId", n => { ObjectId = n.GetStringValue(); } }, + {"objectTypeName", n => { ObjectTypeName = n.GetStringValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("links", Links); + writer.WriteStringValue("objectId", ObjectId); + writer.WriteStringValue("objectTypeName", ObjectTypeName); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationLinkedObjects.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationLinkedObjects.cs new file mode 100644 index 00000000000..bac94f44700 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationLinkedObjects.cs @@ -0,0 +1,111 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class SynchronizationLinkedObjects : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The manager property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public SynchronizationJobSubject? Manager { + get { return BackingStore?.Get("manager"); } + set { BackingStore?.Set("manager", value); } + } +#nullable restore +#else + public SynchronizationJobSubject Manager { + get { return BackingStore?.Get("manager"); } + set { BackingStore?.Set("manager", value); } + } +#endif + /// The members property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Members { + get { return BackingStore?.Get?>("members"); } + set { BackingStore?.Set("members", value); } + } +#nullable restore +#else + public List Members { + get { return BackingStore?.Get>("members"); } + set { BackingStore?.Set("members", value); } + } +#endif + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The owners property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Owners { + get { return BackingStore?.Get?>("owners"); } + set { BackingStore?.Set("owners", value); } + } +#nullable restore +#else + public List Owners { + get { return BackingStore?.Get>("owners"); } + set { BackingStore?.Set("owners", value); } + } +#endif + /// + /// Instantiates a new synchronizationLinkedObjects and sets the default values. + /// + public SynchronizationLinkedObjects() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static SynchronizationLinkedObjects CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new SynchronizationLinkedObjects(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"manager", n => { Manager = n.GetObjectValue(SynchronizationJobSubject.CreateFromDiscriminatorValue); } }, + {"members", n => { Members = n.GetCollectionOfObjectValues(SynchronizationJobSubject.CreateFromDiscriminatorValue)?.ToList(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"owners", n => { Owners = n.GetCollectionOfObjectValues(SynchronizationJobSubject.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("manager", Manager); + writer.WriteCollectionOfObjectValues("members", Members); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteCollectionOfObjectValues("owners", Owners); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationMetadata.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationMetadata.cs new file mode 100644 index 00000000000..e4a853b3354 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationMetadata.cs @@ -0,0 +1,24 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum SynchronizationMetadata { + [EnumMember(Value = "GalleryApplicationIdentifier")] + GalleryApplicationIdentifier, + [EnumMember(Value = "GalleryApplicationKey")] + GalleryApplicationKey, + [EnumMember(Value = "IsOAuthEnabled")] + IsOAuthEnabled, + [EnumMember(Value = "IsSynchronizationAgentAssignmentRequired")] + IsSynchronizationAgentAssignmentRequired, + [EnumMember(Value = "IsSynchronizationAgentRequired")] + IsSynchronizationAgentRequired, + [EnumMember(Value = "IsSynchronizationInPreview")] + IsSynchronizationInPreview, + [EnumMember(Value = "OAuthSettings")] + OAuthSettings, + [EnumMember(Value = "SynchronizationLearnMoreIbizaFwLink")] + SynchronizationLearnMoreIbizaFwLink, + [EnumMember(Value = "ConfigurationFields")] + ConfigurationFields, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationMetadataEntry.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationMetadataEntry.cs new file mode 100644 index 00000000000..f344dce7747 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationMetadataEntry.cs @@ -0,0 +1,86 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class SynchronizationMetadataEntry : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The key property + public SynchronizationMetadata? Key { + get { return BackingStore?.Get("key"); } + set { BackingStore?.Set("key", value); } + } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Value { + get { return BackingStore?.Get("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public string Value { + get { return BackingStore?.Get("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// Instantiates a new synchronizationMetadataEntry and sets the default values. + /// + public SynchronizationMetadataEntry() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static SynchronizationMetadataEntry CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new SynchronizationMetadataEntry(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"key", n => { Key = n.GetEnumValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"value", n => { Value = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("key", Key); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteStringValue("value", Value); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationProgress.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationProgress.cs new file mode 100644 index 00000000000..77302612de5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationProgress.cs @@ -0,0 +1,100 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class SynchronizationProgress : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The completedUnits property + public long? CompletedUnits { + get { return BackingStore?.Get("completedUnits"); } + set { BackingStore?.Set("completedUnits", value); } + } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The progressObservationDateTime property + public DateTimeOffset? ProgressObservationDateTime { + get { return BackingStore?.Get("progressObservationDateTime"); } + set { BackingStore?.Set("progressObservationDateTime", value); } + } + /// The totalUnits property + public long? TotalUnits { + get { return BackingStore?.Get("totalUnits"); } + set { BackingStore?.Set("totalUnits", value); } + } + /// The units property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Units { + get { return BackingStore?.Get("units"); } + set { BackingStore?.Set("units", value); } + } +#nullable restore +#else + public string Units { + get { return BackingStore?.Get("units"); } + set { BackingStore?.Set("units", value); } + } +#endif + /// + /// Instantiates a new synchronizationProgress and sets the default values. + /// + public SynchronizationProgress() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static SynchronizationProgress CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new SynchronizationProgress(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"completedUnits", n => { CompletedUnits = n.GetLongValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"progressObservationDateTime", n => { ProgressObservationDateTime = n.GetDateTimeOffsetValue(); } }, + {"totalUnits", n => { TotalUnits = n.GetLongValue(); } }, + {"units", n => { Units = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteLongValue("completedUnits", CompletedUnits); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteDateTimeOffsetValue("progressObservationDateTime", ProgressObservationDateTime); + writer.WriteLongValue("totalUnits", TotalUnits); + writer.WriteStringValue("units", Units); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationQuarantine.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationQuarantine.cs new file mode 100644 index 00000000000..b8b4ffbcf2c --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationQuarantine.cs @@ -0,0 +1,114 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class SynchronizationQuarantine : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The currentBegan property + public DateTimeOffset? CurrentBegan { + get { return BackingStore?.Get("currentBegan"); } + set { BackingStore?.Set("currentBegan", value); } + } + /// The error property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public SynchronizationError? Error { + get { return BackingStore?.Get("error"); } + set { BackingStore?.Set("error", value); } + } +#nullable restore +#else + public SynchronizationError Error { + get { return BackingStore?.Get("error"); } + set { BackingStore?.Set("error", value); } + } +#endif + /// The nextAttempt property + public DateTimeOffset? NextAttempt { + get { return BackingStore?.Get("nextAttempt"); } + set { BackingStore?.Set("nextAttempt", value); } + } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The reason property + public QuarantineReason? Reason { + get { return BackingStore?.Get("reason"); } + set { BackingStore?.Set("reason", value); } + } + /// The seriesBegan property + public DateTimeOffset? SeriesBegan { + get { return BackingStore?.Get("seriesBegan"); } + set { BackingStore?.Set("seriesBegan", value); } + } + /// The seriesCount property + public long? SeriesCount { + get { return BackingStore?.Get("seriesCount"); } + set { BackingStore?.Set("seriesCount", value); } + } + /// + /// Instantiates a new synchronizationQuarantine and sets the default values. + /// + public SynchronizationQuarantine() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static SynchronizationQuarantine CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new SynchronizationQuarantine(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"currentBegan", n => { CurrentBegan = n.GetDateTimeOffsetValue(); } }, + {"error", n => { Error = n.GetObjectValue(SynchronizationError.CreateFromDiscriminatorValue); } }, + {"nextAttempt", n => { NextAttempt = n.GetDateTimeOffsetValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"reason", n => { Reason = n.GetEnumValue(); } }, + {"seriesBegan", n => { SeriesBegan = n.GetDateTimeOffsetValue(); } }, + {"seriesCount", n => { SeriesCount = n.GetLongValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("currentBegan", CurrentBegan); + writer.WriteObjectValue("error", Error); + writer.WriteDateTimeOffsetValue("nextAttempt", NextAttempt); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteEnumValue("reason", Reason); + writer.WriteDateTimeOffsetValue("seriesBegan", SeriesBegan); + writer.WriteLongValue("seriesCount", SeriesCount); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationRule.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationRule.cs new file mode 100644 index 00000000000..8fc516e94cb --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationRule.cs @@ -0,0 +1,205 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class SynchronizationRule : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The containerFilter property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Models.ContainerFilter? ContainerFilter { + get { return BackingStore?.Get("containerFilter"); } + set { BackingStore?.Set("containerFilter", value); } + } +#nullable restore +#else + public Microsoft.Graph.Models.ContainerFilter ContainerFilter { + get { return BackingStore?.Get("containerFilter"); } + set { BackingStore?.Set("containerFilter", value); } + } +#endif + /// The editable property + public bool? Editable { + get { return BackingStore?.Get("editable"); } + set { BackingStore?.Set("editable", value); } + } + /// The groupFilter property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public Microsoft.Graph.Models.GroupFilter? GroupFilter { + get { return BackingStore?.Get("groupFilter"); } + set { BackingStore?.Set("groupFilter", value); } + } +#nullable restore +#else + public Microsoft.Graph.Models.GroupFilter GroupFilter { + get { return BackingStore?.Get("groupFilter"); } + set { BackingStore?.Set("groupFilter", value); } + } +#endif + /// The id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Id { + get { return BackingStore?.Get("id"); } + set { BackingStore?.Set("id", value); } + } +#nullable restore +#else + public string Id { + get { return BackingStore?.Get("id"); } + set { BackingStore?.Set("id", value); } + } +#endif + /// The metadata property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Metadata { + get { return BackingStore?.Get?>("metadata"); } + set { BackingStore?.Set("metadata", value); } + } +#nullable restore +#else + public List Metadata { + get { return BackingStore?.Get>("metadata"); } + set { BackingStore?.Set("metadata", value); } + } +#endif + /// The name property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { + get { return BackingStore?.Get("name"); } + set { BackingStore?.Set("name", value); } + } +#nullable restore +#else + public string Name { + get { return BackingStore?.Get("name"); } + set { BackingStore?.Set("name", value); } + } +#endif + /// The objectMappings property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? ObjectMappings { + get { return BackingStore?.Get?>("objectMappings"); } + set { BackingStore?.Set("objectMappings", value); } + } +#nullable restore +#else + public List ObjectMappings { + get { return BackingStore?.Get>("objectMappings"); } + set { BackingStore?.Set("objectMappings", value); } + } +#endif + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The priority property + public int? Priority { + get { return BackingStore?.Get("priority"); } + set { BackingStore?.Set("priority", value); } + } + /// The sourceDirectoryName property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SourceDirectoryName { + get { return BackingStore?.Get("sourceDirectoryName"); } + set { BackingStore?.Set("sourceDirectoryName", value); } + } +#nullable restore +#else + public string SourceDirectoryName { + get { return BackingStore?.Get("sourceDirectoryName"); } + set { BackingStore?.Set("sourceDirectoryName", value); } + } +#endif + /// The targetDirectoryName property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TargetDirectoryName { + get { return BackingStore?.Get("targetDirectoryName"); } + set { BackingStore?.Set("targetDirectoryName", value); } + } +#nullable restore +#else + public string TargetDirectoryName { + get { return BackingStore?.Get("targetDirectoryName"); } + set { BackingStore?.Set("targetDirectoryName", value); } + } +#endif + /// + /// Instantiates a new synchronizationRule and sets the default values. + /// + public SynchronizationRule() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static SynchronizationRule CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new SynchronizationRule(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"containerFilter", n => { ContainerFilter = n.GetObjectValue(Microsoft.Graph.Models.ContainerFilter.CreateFromDiscriminatorValue); } }, + {"editable", n => { Editable = n.GetBoolValue(); } }, + {"groupFilter", n => { GroupFilter = n.GetObjectValue(Microsoft.Graph.Models.GroupFilter.CreateFromDiscriminatorValue); } }, + {"id", n => { Id = n.GetStringValue(); } }, + {"metadata", n => { Metadata = n.GetCollectionOfObjectValues(StringKeyStringValuePair.CreateFromDiscriminatorValue)?.ToList(); } }, + {"name", n => { Name = n.GetStringValue(); } }, + {"objectMappings", n => { ObjectMappings = n.GetCollectionOfObjectValues(ObjectMapping.CreateFromDiscriminatorValue)?.ToList(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"priority", n => { Priority = n.GetIntValue(); } }, + {"sourceDirectoryName", n => { SourceDirectoryName = n.GetStringValue(); } }, + {"targetDirectoryName", n => { TargetDirectoryName = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("containerFilter", ContainerFilter); + writer.WriteBoolValue("editable", Editable); + writer.WriteObjectValue("groupFilter", GroupFilter); + writer.WriteStringValue("id", Id); + writer.WriteCollectionOfObjectValues("metadata", Metadata); + writer.WriteStringValue("name", Name); + writer.WriteCollectionOfObjectValues("objectMappings", ObjectMappings); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteIntValue("priority", Priority); + writer.WriteStringValue("sourceDirectoryName", SourceDirectoryName); + writer.WriteStringValue("targetDirectoryName", TargetDirectoryName); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationSchedule.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationSchedule.cs new file mode 100644 index 00000000000..81ee0d93dfe --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationSchedule.cs @@ -0,0 +1,84 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class SynchronizationSchedule : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The expiration property + public DateTimeOffset? Expiration { + get { return BackingStore?.Get("expiration"); } + set { BackingStore?.Set("expiration", value); } + } + /// The interval property + public TimeSpan? Interval { + get { return BackingStore?.Get("interval"); } + set { BackingStore?.Set("interval", value); } + } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The state property + public SynchronizationScheduleState? State { + get { return BackingStore?.Get("state"); } + set { BackingStore?.Set("state", value); } + } + /// + /// Instantiates a new synchronizationSchedule and sets the default values. + /// + public SynchronizationSchedule() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static SynchronizationSchedule CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new SynchronizationSchedule(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"expiration", n => { Expiration = n.GetDateTimeOffsetValue(); } }, + {"interval", n => { Interval = n.GetTimeSpanValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"state", n => { State = n.GetEnumValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteDateTimeOffsetValue("expiration", Expiration); + writer.WriteTimeSpanValue("interval", Interval); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteEnumValue("state", State); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationScheduleState.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationScheduleState.cs new file mode 100644 index 00000000000..24b512da26b --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationScheduleState.cs @@ -0,0 +1,12 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum SynchronizationScheduleState { + [EnumMember(Value = "Active")] + Active, + [EnumMember(Value = "Disabled")] + Disabled, + [EnumMember(Value = "Paused")] + Paused, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationSchema.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationSchema.cs new file mode 100644 index 00000000000..bf5e45baa86 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationSchema.cs @@ -0,0 +1,80 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class SynchronizationSchema : Entity, IParsable { + /// The directories property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Directories { + get { return BackingStore?.Get?>("directories"); } + set { BackingStore?.Set("directories", value); } + } +#nullable restore +#else + public List Directories { + get { return BackingStore?.Get>("directories"); } + set { BackingStore?.Set("directories", value); } + } +#endif + /// The synchronizationRules property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SynchronizationRules { + get { return BackingStore?.Get?>("synchronizationRules"); } + set { BackingStore?.Set("synchronizationRules", value); } + } +#nullable restore +#else + public List SynchronizationRules { + get { return BackingStore?.Get>("synchronizationRules"); } + set { BackingStore?.Set("synchronizationRules", value); } + } +#endif + /// The version property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Version { + get { return BackingStore?.Get("version"); } + set { BackingStore?.Set("version", value); } + } +#nullable restore +#else + public string Version { + get { return BackingStore?.Get("version"); } + set { BackingStore?.Set("version", value); } + } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static new SynchronizationSchema CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new SynchronizationSchema(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"directories", n => { Directories = n.GetCollectionOfObjectValues(DirectoryDefinition.CreateFromDiscriminatorValue)?.ToList(); } }, + {"synchronizationRules", n => { SynchronizationRules = n.GetCollectionOfObjectValues(SynchronizationRule.CreateFromDiscriminatorValue)?.ToList(); } }, + {"version", n => { Version = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("directories", Directories); + writer.WriteCollectionOfObjectValues("synchronizationRules", SynchronizationRules); + writer.WriteStringValue("version", Version); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationSecret.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationSecret.cs new file mode 100644 index 00000000000..e74b41e4dea --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationSecret.cs @@ -0,0 +1,96 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum SynchronizationSecret { + [EnumMember(Value = "None")] + None, + [EnumMember(Value = "UserName")] + UserName, + [EnumMember(Value = "Password")] + Password, + [EnumMember(Value = "SecretToken")] + SecretToken, + [EnumMember(Value = "AppKey")] + AppKey, + [EnumMember(Value = "BaseAddress")] + BaseAddress, + [EnumMember(Value = "ClientIdentifier")] + ClientIdentifier, + [EnumMember(Value = "ClientSecret")] + ClientSecret, + [EnumMember(Value = "SingleSignOnType")] + SingleSignOnType, + [EnumMember(Value = "Sandbox")] + Sandbox, + [EnumMember(Value = "Url")] + Url, + [EnumMember(Value = "Domain")] + Domain, + [EnumMember(Value = "ConsumerKey")] + ConsumerKey, + [EnumMember(Value = "ConsumerSecret")] + ConsumerSecret, + [EnumMember(Value = "TokenKey")] + TokenKey, + [EnumMember(Value = "TokenExpiration")] + TokenExpiration, + [EnumMember(Value = "Oauth2AccessToken")] + Oauth2AccessToken, + [EnumMember(Value = "Oauth2AccessTokenCreationTime")] + Oauth2AccessTokenCreationTime, + [EnumMember(Value = "Oauth2RefreshToken")] + Oauth2RefreshToken, + [EnumMember(Value = "SyncAll")] + SyncAll, + [EnumMember(Value = "InstanceName")] + InstanceName, + [EnumMember(Value = "Oauth2ClientId")] + Oauth2ClientId, + [EnumMember(Value = "Oauth2ClientSecret")] + Oauth2ClientSecret, + [EnumMember(Value = "CompanyId")] + CompanyId, + [EnumMember(Value = "UpdateKeyOnSoftDelete")] + UpdateKeyOnSoftDelete, + [EnumMember(Value = "SynchronizationSchedule")] + SynchronizationSchedule, + [EnumMember(Value = "SystemOfRecord")] + SystemOfRecord, + [EnumMember(Value = "SandboxName")] + SandboxName, + [EnumMember(Value = "EnforceDomain")] + EnforceDomain, + [EnumMember(Value = "SyncNotificationSettings")] + SyncNotificationSettings, + [EnumMember(Value = "SkipOutOfScopeDeletions")] + SkipOutOfScopeDeletions, + [EnumMember(Value = "Oauth2AuthorizationCode")] + Oauth2AuthorizationCode, + [EnumMember(Value = "Oauth2RedirectUri")] + Oauth2RedirectUri, + [EnumMember(Value = "ApplicationTemplateIdentifier")] + ApplicationTemplateIdentifier, + [EnumMember(Value = "Oauth2TokenExchangeUri")] + Oauth2TokenExchangeUri, + [EnumMember(Value = "Oauth2AuthorizationUri")] + Oauth2AuthorizationUri, + [EnumMember(Value = "AuthenticationType")] + AuthenticationType, + [EnumMember(Value = "Server")] + Server, + [EnumMember(Value = "PerformInboundEntitlementGrants")] + PerformInboundEntitlementGrants, + [EnumMember(Value = "HardDeletesEnabled")] + HardDeletesEnabled, + [EnumMember(Value = "SyncAgentCompatibilityKey")] + SyncAgentCompatibilityKey, + [EnumMember(Value = "SyncAgentADContainer")] + SyncAgentADContainer, + [EnumMember(Value = "ValidateDomain")] + ValidateDomain, + [EnumMember(Value = "TestReferences")] + TestReferences, + [EnumMember(Value = "ConnectionString")] + ConnectionString, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationSecretKeyStringValuePair.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationSecretKeyStringValuePair.cs new file mode 100644 index 00000000000..44bd3a77a3e --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationSecretKeyStringValuePair.cs @@ -0,0 +1,86 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class SynchronizationSecretKeyStringValuePair : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The key property + public SynchronizationSecret? Key { + get { return BackingStore?.Get("key"); } + set { BackingStore?.Set("key", value); } + } + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Value { + get { return BackingStore?.Get("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public string Value { + get { return BackingStore?.Get("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// Instantiates a new synchronizationSecretKeyStringValuePair and sets the default values. + /// + public SynchronizationSecretKeyStringValuePair() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static SynchronizationSecretKeyStringValuePair CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new SynchronizationSecretKeyStringValuePair(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"key", n => { Key = n.GetEnumValue(); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"value", n => { Value = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("key", Key); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteStringValue("value", Value); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationStatus.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationStatus.cs new file mode 100644 index 00000000000..3cf73cf432e --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationStatus.cs @@ -0,0 +1,210 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class SynchronizationStatus : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The code property + public SynchronizationStatusCode? Code { + get { return BackingStore?.Get("code"); } + set { BackingStore?.Set("code", value); } + } + /// The countSuccessiveCompleteFailures property + public long? CountSuccessiveCompleteFailures { + get { return BackingStore?.Get("countSuccessiveCompleteFailures"); } + set { BackingStore?.Set("countSuccessiveCompleteFailures", value); } + } + /// The escrowsPruned property + public bool? EscrowsPruned { + get { return BackingStore?.Get("escrowsPruned"); } + set { BackingStore?.Set("escrowsPruned", value); } + } + /// The lastExecution property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public SynchronizationTaskExecution? LastExecution { + get { return BackingStore?.Get("lastExecution"); } + set { BackingStore?.Set("lastExecution", value); } + } +#nullable restore +#else + public SynchronizationTaskExecution LastExecution { + get { return BackingStore?.Get("lastExecution"); } + set { BackingStore?.Set("lastExecution", value); } + } +#endif + /// The lastSuccessfulExecution property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public SynchronizationTaskExecution? LastSuccessfulExecution { + get { return BackingStore?.Get("lastSuccessfulExecution"); } + set { BackingStore?.Set("lastSuccessfulExecution", value); } + } +#nullable restore +#else + public SynchronizationTaskExecution LastSuccessfulExecution { + get { return BackingStore?.Get("lastSuccessfulExecution"); } + set { BackingStore?.Set("lastSuccessfulExecution", value); } + } +#endif + /// The lastSuccessfulExecutionWithExports property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public SynchronizationTaskExecution? LastSuccessfulExecutionWithExports { + get { return BackingStore?.Get("lastSuccessfulExecutionWithExports"); } + set { BackingStore?.Set("lastSuccessfulExecutionWithExports", value); } + } +#nullable restore +#else + public SynchronizationTaskExecution LastSuccessfulExecutionWithExports { + get { return BackingStore?.Get("lastSuccessfulExecutionWithExports"); } + set { BackingStore?.Set("lastSuccessfulExecutionWithExports", value); } + } +#endif + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The progress property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Progress { + get { return BackingStore?.Get?>("progress"); } + set { BackingStore?.Set("progress", value); } + } +#nullable restore +#else + public List Progress { + get { return BackingStore?.Get>("progress"); } + set { BackingStore?.Set("progress", value); } + } +#endif + /// The quarantine property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public SynchronizationQuarantine? Quarantine { + get { return BackingStore?.Get("quarantine"); } + set { BackingStore?.Set("quarantine", value); } + } +#nullable restore +#else + public SynchronizationQuarantine Quarantine { + get { return BackingStore?.Get("quarantine"); } + set { BackingStore?.Set("quarantine", value); } + } +#endif + /// The steadyStateFirstAchievedTime property + public DateTimeOffset? SteadyStateFirstAchievedTime { + get { return BackingStore?.Get("steadyStateFirstAchievedTime"); } + set { BackingStore?.Set("steadyStateFirstAchievedTime", value); } + } + /// The steadyStateLastAchievedTime property + public DateTimeOffset? SteadyStateLastAchievedTime { + get { return BackingStore?.Get("steadyStateLastAchievedTime"); } + set { BackingStore?.Set("steadyStateLastAchievedTime", value); } + } + /// The synchronizedEntryCountByType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? SynchronizedEntryCountByType { + get { return BackingStore?.Get?>("synchronizedEntryCountByType"); } + set { BackingStore?.Set("synchronizedEntryCountByType", value); } + } +#nullable restore +#else + public List SynchronizedEntryCountByType { + get { return BackingStore?.Get>("synchronizedEntryCountByType"); } + set { BackingStore?.Set("synchronizedEntryCountByType", value); } + } +#endif + /// The troubleshootingUrl property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TroubleshootingUrl { + get { return BackingStore?.Get("troubleshootingUrl"); } + set { BackingStore?.Set("troubleshootingUrl", value); } + } +#nullable restore +#else + public string TroubleshootingUrl { + get { return BackingStore?.Get("troubleshootingUrl"); } + set { BackingStore?.Set("troubleshootingUrl", value); } + } +#endif + /// + /// Instantiates a new synchronizationStatus and sets the default values. + /// + public SynchronizationStatus() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static SynchronizationStatus CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new SynchronizationStatus(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"code", n => { Code = n.GetEnumValue(); } }, + {"countSuccessiveCompleteFailures", n => { CountSuccessiveCompleteFailures = n.GetLongValue(); } }, + {"escrowsPruned", n => { EscrowsPruned = n.GetBoolValue(); } }, + {"lastExecution", n => { LastExecution = n.GetObjectValue(SynchronizationTaskExecution.CreateFromDiscriminatorValue); } }, + {"lastSuccessfulExecution", n => { LastSuccessfulExecution = n.GetObjectValue(SynchronizationTaskExecution.CreateFromDiscriminatorValue); } }, + {"lastSuccessfulExecutionWithExports", n => { LastSuccessfulExecutionWithExports = n.GetObjectValue(SynchronizationTaskExecution.CreateFromDiscriminatorValue); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"progress", n => { Progress = n.GetCollectionOfObjectValues(SynchronizationProgress.CreateFromDiscriminatorValue)?.ToList(); } }, + {"quarantine", n => { Quarantine = n.GetObjectValue(SynchronizationQuarantine.CreateFromDiscriminatorValue); } }, + {"steadyStateFirstAchievedTime", n => { SteadyStateFirstAchievedTime = n.GetDateTimeOffsetValue(); } }, + {"steadyStateLastAchievedTime", n => { SteadyStateLastAchievedTime = n.GetDateTimeOffsetValue(); } }, + {"synchronizedEntryCountByType", n => { SynchronizedEntryCountByType = n.GetCollectionOfObjectValues(StringKeyLongValuePair.CreateFromDiscriminatorValue)?.ToList(); } }, + {"troubleshootingUrl", n => { TroubleshootingUrl = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("code", Code); + writer.WriteLongValue("countSuccessiveCompleteFailures", CountSuccessiveCompleteFailures); + writer.WriteBoolValue("escrowsPruned", EscrowsPruned); + writer.WriteObjectValue("lastExecution", LastExecution); + writer.WriteObjectValue("lastSuccessfulExecution", LastSuccessfulExecution); + writer.WriteObjectValue("lastSuccessfulExecutionWithExports", LastSuccessfulExecutionWithExports); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteCollectionOfObjectValues("progress", Progress); + writer.WriteObjectValue("quarantine", Quarantine); + writer.WriteDateTimeOffsetValue("steadyStateFirstAchievedTime", SteadyStateFirstAchievedTime); + writer.WriteDateTimeOffsetValue("steadyStateLastAchievedTime", SteadyStateLastAchievedTime); + writer.WriteCollectionOfObjectValues("synchronizedEntryCountByType", SynchronizedEntryCountByType); + writer.WriteStringValue("troubleshootingUrl", TroubleshootingUrl); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationStatusCode.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationStatusCode.cs new file mode 100644 index 00000000000..438d73cd914 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationStatusCode.cs @@ -0,0 +1,16 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum SynchronizationStatusCode { + [EnumMember(Value = "NotConfigured")] + NotConfigured, + [EnumMember(Value = "NotRun")] + NotRun, + [EnumMember(Value = "Active")] + Active, + [EnumMember(Value = "Paused")] + Paused, + [EnumMember(Value = "Quarantine")] + Quarantine, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationTaskExecution.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationTaskExecution.cs new file mode 100644 index 00000000000..be8fb73c483 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationTaskExecution.cs @@ -0,0 +1,179 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class SynchronizationTaskExecution : IAdditionalDataHolder, IBackedModel, IParsable { + /// The activityIdentifier property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ActivityIdentifier { + get { return BackingStore?.Get("activityIdentifier"); } + set { BackingStore?.Set("activityIdentifier", value); } + } +#nullable restore +#else + public string ActivityIdentifier { + get { return BackingStore?.Get("activityIdentifier"); } + set { BackingStore?.Set("activityIdentifier", value); } + } +#endif + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The countEntitled property + public long? CountEntitled { + get { return BackingStore?.Get("countEntitled"); } + set { BackingStore?.Set("countEntitled", value); } + } + /// The countEntitledForProvisioning property + public long? CountEntitledForProvisioning { + get { return BackingStore?.Get("countEntitledForProvisioning"); } + set { BackingStore?.Set("countEntitledForProvisioning", value); } + } + /// The countEscrowed property + public long? CountEscrowed { + get { return BackingStore?.Get("countEscrowed"); } + set { BackingStore?.Set("countEscrowed", value); } + } + /// The countEscrowedRaw property + public long? CountEscrowedRaw { + get { return BackingStore?.Get("countEscrowedRaw"); } + set { BackingStore?.Set("countEscrowedRaw", value); } + } + /// The countExported property + public long? CountExported { + get { return BackingStore?.Get("countExported"); } + set { BackingStore?.Set("countExported", value); } + } + /// The countExports property + public long? CountExports { + get { return BackingStore?.Get("countExports"); } + set { BackingStore?.Set("countExports", value); } + } + /// The countImported property + public long? CountImported { + get { return BackingStore?.Get("countImported"); } + set { BackingStore?.Set("countImported", value); } + } + /// The countImportedDeltas property + public long? CountImportedDeltas { + get { return BackingStore?.Get("countImportedDeltas"); } + set { BackingStore?.Set("countImportedDeltas", value); } + } + /// The countImportedReferenceDeltas property + public long? CountImportedReferenceDeltas { + get { return BackingStore?.Get("countImportedReferenceDeltas"); } + set { BackingStore?.Set("countImportedReferenceDeltas", value); } + } + /// The error property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public SynchronizationError? Error { + get { return BackingStore?.Get("error"); } + set { BackingStore?.Set("error", value); } + } +#nullable restore +#else + public SynchronizationError Error { + get { return BackingStore?.Get("error"); } + set { BackingStore?.Set("error", value); } + } +#endif + /// The OdataType property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#nullable restore +#else + public string OdataType { + get { return BackingStore?.Get("@odata.type"); } + set { BackingStore?.Set("@odata.type", value); } + } +#endif + /// The state property + public SynchronizationTaskExecutionResult? State { + get { return BackingStore?.Get("state"); } + set { BackingStore?.Set("state", value); } + } + /// The timeBegan property + public DateTimeOffset? TimeBegan { + get { return BackingStore?.Get("timeBegan"); } + set { BackingStore?.Set("timeBegan", value); } + } + /// The timeEnded property + public DateTimeOffset? TimeEnded { + get { return BackingStore?.Get("timeEnded"); } + set { BackingStore?.Set("timeEnded", value); } + } + /// + /// Instantiates a new synchronizationTaskExecution and sets the default values. + /// + public SynchronizationTaskExecution() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static SynchronizationTaskExecution CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new SynchronizationTaskExecution(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"activityIdentifier", n => { ActivityIdentifier = n.GetStringValue(); } }, + {"countEntitled", n => { CountEntitled = n.GetLongValue(); } }, + {"countEntitledForProvisioning", n => { CountEntitledForProvisioning = n.GetLongValue(); } }, + {"countEscrowed", n => { CountEscrowed = n.GetLongValue(); } }, + {"countEscrowedRaw", n => { CountEscrowedRaw = n.GetLongValue(); } }, + {"countExported", n => { CountExported = n.GetLongValue(); } }, + {"countExports", n => { CountExports = n.GetLongValue(); } }, + {"countImported", n => { CountImported = n.GetLongValue(); } }, + {"countImportedDeltas", n => { CountImportedDeltas = n.GetLongValue(); } }, + {"countImportedReferenceDeltas", n => { CountImportedReferenceDeltas = n.GetLongValue(); } }, + {"error", n => { Error = n.GetObjectValue(SynchronizationError.CreateFromDiscriminatorValue); } }, + {"@odata.type", n => { OdataType = n.GetStringValue(); } }, + {"state", n => { State = n.GetEnumValue(); } }, + {"timeBegan", n => { TimeBegan = n.GetDateTimeOffsetValue(); } }, + {"timeEnded", n => { TimeEnded = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("activityIdentifier", ActivityIdentifier); + writer.WriteLongValue("countEntitled", CountEntitled); + writer.WriteLongValue("countEntitledForProvisioning", CountEntitledForProvisioning); + writer.WriteLongValue("countEscrowed", CountEscrowed); + writer.WriteLongValue("countEscrowedRaw", CountEscrowedRaw); + writer.WriteLongValue("countExported", CountExported); + writer.WriteLongValue("countExports", CountExports); + writer.WriteLongValue("countImported", CountImported); + writer.WriteLongValue("countImportedDeltas", CountImportedDeltas); + writer.WriteLongValue("countImportedReferenceDeltas", CountImportedReferenceDeltas); + writer.WriteObjectValue("error", Error); + writer.WriteStringValue("@odata.type", OdataType); + writer.WriteEnumValue("state", State); + writer.WriteDateTimeOffsetValue("timeBegan", TimeBegan); + writer.WriteDateTimeOffsetValue("timeEnded", TimeEnded); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationTaskExecutionResult.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationTaskExecutionResult.cs new file mode 100644 index 00000000000..9e4752602f5 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationTaskExecutionResult.cs @@ -0,0 +1,12 @@ +using System.Runtime.Serialization; +using System; +namespace Microsoft.Graph.Models { + public enum SynchronizationTaskExecutionResult { + [EnumMember(Value = "Succeeded")] + Succeeded, + [EnumMember(Value = "Failed")] + Failed, + [EnumMember(Value = "EntryLevelErrors")] + EntryLevelErrors, + } +} diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationTemplate.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationTemplate.cs new file mode 100644 index 00000000000..1903215bbf7 --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationTemplate.cs @@ -0,0 +1,117 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class SynchronizationTemplate : Entity, IParsable { + /// The applicationId property + public Guid? ApplicationId { + get { return BackingStore?.Get("applicationId"); } + set { BackingStore?.Set("applicationId", value); } + } + /// The default property + public bool? Default { + get { return BackingStore?.Get("default"); } + set { BackingStore?.Set("default", value); } + } + /// The description property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Description { + get { return BackingStore?.Get("description"); } + set { BackingStore?.Set("description", value); } + } +#nullable restore +#else + public string Description { + get { return BackingStore?.Get("description"); } + set { BackingStore?.Set("description", value); } + } +#endif + /// The discoverable property + public bool? Discoverable { + get { return BackingStore?.Get("discoverable"); } + set { BackingStore?.Set("discoverable", value); } + } + /// The factoryTag property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FactoryTag { + get { return BackingStore?.Get("factoryTag"); } + set { BackingStore?.Set("factoryTag", value); } + } +#nullable restore +#else + public string FactoryTag { + get { return BackingStore?.Get("factoryTag"); } + set { BackingStore?.Set("factoryTag", value); } + } +#endif + /// The metadata property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Metadata { + get { return BackingStore?.Get?>("metadata"); } + set { BackingStore?.Set("metadata", value); } + } +#nullable restore +#else + public List Metadata { + get { return BackingStore?.Get>("metadata"); } + set { BackingStore?.Set("metadata", value); } + } +#endif + /// The schema property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public SynchronizationSchema? Schema { + get { return BackingStore?.Get("schema"); } + set { BackingStore?.Set("schema", value); } + } +#nullable restore +#else + public SynchronizationSchema Schema { + get { return BackingStore?.Get("schema"); } + set { BackingStore?.Set("schema", value); } + } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static new SynchronizationTemplate CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new SynchronizationTemplate(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"applicationId", n => { ApplicationId = n.GetGuidValue(); } }, + {"default", n => { Default = n.GetBoolValue(); } }, + {"description", n => { Description = n.GetStringValue(); } }, + {"discoverable", n => { Discoverable = n.GetBoolValue(); } }, + {"factoryTag", n => { FactoryTag = n.GetStringValue(); } }, + {"metadata", n => { Metadata = n.GetCollectionOfObjectValues(SynchronizationMetadataEntry.CreateFromDiscriminatorValue)?.ToList(); } }, + {"schema", n => { Schema = n.GetObjectValue(SynchronizationSchema.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteGuidValue("applicationId", ApplicationId); + writer.WriteBoolValue("default", Default); + writer.WriteStringValue("description", Description); + writer.WriteBoolValue("discoverable", Discoverable); + writer.WriteStringValue("factoryTag", FactoryTag); + writer.WriteCollectionOfObjectValues("metadata", Metadata); + writer.WriteObjectValue("schema", Schema); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/SynchronizationTemplateCollectionResponse.cs b/src/Microsoft.Graph/Generated/Models/SynchronizationTemplateCollectionResponse.cs new file mode 100644 index 00000000000..a8ef9edc88f --- /dev/null +++ b/src/Microsoft.Graph/Generated/Models/SynchronizationTemplateCollectionResponse.cs @@ -0,0 +1,48 @@ +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.Models { + public class SynchronizationTemplateCollectionResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static new SynchronizationTemplateCollectionResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new SynchronizationTemplateCollectionResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(SynchronizationTemplate.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/Models/TermsAndConditions.cs b/src/Microsoft.Graph/Generated/Models/TermsAndConditions.cs index c0ab2ed8633..596dc08eca7 100644 --- a/src/Microsoft.Graph/Generated/Models/TermsAndConditions.cs +++ b/src/Microsoft.Graph/Generated/Models/TermsAndConditions.cs @@ -4,6 +4,9 @@ using System.Linq; using System; namespace Microsoft.Graph.Models { + /// + /// A termsAndConditions entity represents the metadata and contents of a given Terms and Conditions (T&C) policy. T&C policies’ contents are presented to users upon their first attempt to enroll into Intune and subsequently upon edits where an administrator has required re-acceptance. They enable administrators to communicate the provisions to which a user must agree in order to have devices enrolled into Intune. + /// public class TermsAndConditions : Entity, IParsable { /// Administrator-supplied explanation of the terms and conditions, typically describing what it means to accept the terms and conditions set out in the T&C policy. This is shown to the user on prompts to accept the T&C policy. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER diff --git a/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Partners/Item/IdentitySynchronization/IdentitySynchronizationRequestBuilder.cs b/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Partners/Item/IdentitySynchronization/IdentitySynchronizationRequestBuilder.cs index 3cbc446072f..cf8cba19301 100644 --- a/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Partners/Item/IdentitySynchronization/IdentitySynchronizationRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Policies/CrossTenantAccessPolicy/Partners/Item/IdentitySynchronization/IdentitySynchronizationRequestBuilder.cs @@ -68,8 +68,8 @@ public async Task GetAsync(Action(requestInfo, CrossTenantIdentitySyncPolicyPartner.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Update the user synchronization policy of a partner-specific configuration. - /// Find more info here + /// Create a cross-tenant user synchronization policy for a partner-specific configuration. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -140,7 +140,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the user synchronization policy of a partner-specific configuration. + /// Create a cross-tenant user synchronization policy for a partner-specific configuration. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/ServicePrincipalItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/ServicePrincipalItemRequestBuilder.cs index df90417d86e..52d73fcc967 100644 --- a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/ServicePrincipalItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/ServicePrincipalItemRequestBuilder.cs @@ -23,6 +23,7 @@ using Microsoft.Graph.ServicePrincipals.Item.RemoveKey; using Microsoft.Graph.ServicePrincipals.Item.RemovePassword; using Microsoft.Graph.ServicePrincipals.Item.Restore; +using Microsoft.Graph.ServicePrincipals.Item.Synchronization; using Microsoft.Graph.ServicePrincipals.Item.TokenIssuancePolicies; using Microsoft.Graph.ServicePrincipals.Item.TokenLifetimePolicies; using Microsoft.Graph.ServicePrincipals.Item.TransitiveMemberOf; @@ -131,6 +132,10 @@ public class ServicePrincipalItemRequestBuilder : BaseRequestBuilder { public RestoreRequestBuilder Restore { get => new RestoreRequestBuilder(PathParameters, RequestAdapter); } + /// Provides operations to manage the synchronization property of the microsoft.graph.servicePrincipal entity. + public SynchronizationRequestBuilder Synchronization { get => + new SynchronizationRequestBuilder(PathParameters, RequestAdapter); + } /// Provides operations to manage the tokenIssuancePolicies property of the microsoft.graph.servicePrincipal entity. public TokenIssuancePoliciesRequestBuilder TokenIssuancePolicies { get => new TokenIssuancePoliciesRequestBuilder(PathParameters, RequestAdapter); diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/AcquireAccessToken/AcquireAccessTokenPostRequestBody.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/AcquireAccessToken/AcquireAccessTokenPostRequestBody.cs new file mode 100644 index 00000000000..986854b0831 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/AcquireAccessToken/AcquireAccessTokenPostRequestBody.cs @@ -0,0 +1,64 @@ +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.AcquireAccessToken { + public class AcquireAccessTokenPostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The credentials property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Credentials { + get { return BackingStore?.Get?>("credentials"); } + set { BackingStore?.Set("credentials", value); } + } +#nullable restore +#else + public List Credentials { + get { return BackingStore?.Get>("credentials"); } + set { BackingStore?.Set("credentials", value); } + } +#endif + /// + /// Instantiates a new acquireAccessTokenPostRequestBody and sets the default values. + /// + public AcquireAccessTokenPostRequestBody() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static AcquireAccessTokenPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new AcquireAccessTokenPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"credentials", n => { Credentials = n.GetCollectionOfObjectValues(SynchronizationSecretKeyStringValuePair.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("credentials", Credentials); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/AcquireAccessToken/AcquireAccessTokenRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/AcquireAccessToken/AcquireAccessTokenRequestBuilder.cs new file mode 100644 index 00000000000..fcda49a59f3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/AcquireAccessToken/AcquireAccessTokenRequestBuilder.cs @@ -0,0 +1,94 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.AcquireAccessToken { + /// + /// Provides operations to call the acquireAccessToken method. + /// + public class AcquireAccessTokenRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new AcquireAccessTokenRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AcquireAccessTokenRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/acquireAccessToken", pathParameters) { + } + /// + /// Instantiates a new AcquireAccessTokenRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public AcquireAccessTokenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/acquireAccessToken", rawUrl) { + } + /// + /// Invoke action acquireAccessToken + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(AcquireAccessTokenPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(AcquireAccessTokenPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Invoke action acquireAccessToken + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(AcquireAccessTokenPostRequestBody body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(AcquireAccessTokenPostRequestBody body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new AcquireAccessTokenRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class AcquireAccessTokenRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new acquireAccessTokenRequestBuilderPostRequestConfiguration and sets the default values. + /// + public AcquireAccessTokenRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..3fbc9e5cf22 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs/$count{?%24search,%24filter}", pathParameters) { + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Pause/PauseRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Pause/PauseRequestBuilder.cs new file mode 100644 index 00000000000..c0846239b8d --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Pause/PauseRequestBuilder.cs @@ -0,0 +1,89 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Item.Pause { + /// + /// Provides operations to call the pause method. + /// + public class PauseRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new PauseRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PauseRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs/{synchronizationJob%2Did}/pause", pathParameters) { + } + /// + /// Instantiates a new PauseRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public PauseRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs/{synchronizationJob%2Did}/pause", rawUrl) { + } + /// + /// Invoke action pause + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Invoke action pause + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new PauseRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class PauseRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new pauseRequestBuilderPostRequestConfiguration and sets the default values. + /// + public PauseRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/ProvisionOnDemand/ProvisionOnDemandPostRequestBody.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/ProvisionOnDemand/ProvisionOnDemandPostRequestBody.cs new file mode 100644 index 00000000000..cd31fc246b3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/ProvisionOnDemand/ProvisionOnDemandPostRequestBody.cs @@ -0,0 +1,64 @@ +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Item.ProvisionOnDemand { + public class ProvisionOnDemandPostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The parameters property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Parameters { + get { return BackingStore?.Get?>("parameters"); } + set { BackingStore?.Set("parameters", value); } + } +#nullable restore +#else + public List Parameters { + get { return BackingStore?.Get>("parameters"); } + set { BackingStore?.Set("parameters", value); } + } +#endif + /// + /// Instantiates a new provisionOnDemandPostRequestBody and sets the default values. + /// + public ProvisionOnDemandPostRequestBody() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static ProvisionOnDemandPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ProvisionOnDemandPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"parameters", n => { Parameters = n.GetCollectionOfObjectValues(SynchronizationJobApplicationParameters.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfObjectValues("parameters", Parameters); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/ProvisionOnDemand/ProvisionOnDemandRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/ProvisionOnDemand/ProvisionOnDemandRequestBuilder.cs new file mode 100644 index 00000000000..d9431a2e0c2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/ProvisionOnDemand/ProvisionOnDemandRequestBuilder.cs @@ -0,0 +1,96 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Item.ProvisionOnDemand { + /// + /// Provides operations to call the provisionOnDemand method. + /// + public class ProvisionOnDemandRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new ProvisionOnDemandRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ProvisionOnDemandRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs/{synchronizationJob%2Did}/provisionOnDemand", pathParameters) { + } + /// + /// Instantiates a new ProvisionOnDemandRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ProvisionOnDemandRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs/{synchronizationJob%2Did}/provisionOnDemand", rawUrl) { + } + /// + /// Invoke action provisionOnDemand + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(ProvisionOnDemandPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(ProvisionOnDemandPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, StringKeyStringValuePair.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke action provisionOnDemand + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(ProvisionOnDemandPostRequestBody body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(ProvisionOnDemandPostRequestBody body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new ProvisionOnDemandRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ProvisionOnDemandRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new provisionOnDemandRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ProvisionOnDemandRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Restart/RestartPostRequestBody.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Restart/RestartPostRequestBody.cs new file mode 100644 index 00000000000..e19e88e5f20 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Restart/RestartPostRequestBody.cs @@ -0,0 +1,64 @@ +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Item.Restart { + public class RestartPostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The criteria property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public SynchronizationJobRestartCriteria? Criteria { + get { return BackingStore?.Get("criteria"); } + set { BackingStore?.Set("criteria", value); } + } +#nullable restore +#else + public SynchronizationJobRestartCriteria Criteria { + get { return BackingStore?.Get("criteria"); } + set { BackingStore?.Set("criteria", value); } + } +#endif + /// + /// Instantiates a new restartPostRequestBody and sets the default values. + /// + public RestartPostRequestBody() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static RestartPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new RestartPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"criteria", n => { Criteria = n.GetObjectValue(SynchronizationJobRestartCriteria.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("criteria", Criteria); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Restart/RestartRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Restart/RestartRequestBuilder.cs new file mode 100644 index 00000000000..41ebcdb7574 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Restart/RestartRequestBuilder.cs @@ -0,0 +1,94 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Item.Restart { + /// + /// Provides operations to call the restart method. + /// + public class RestartRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new RestartRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RestartRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs/{synchronizationJob%2Did}/restart", pathParameters) { + } + /// + /// Instantiates a new RestartRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public RestartRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs/{synchronizationJob%2Did}/restart", rawUrl) { + } + /// + /// Invoke action restart + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(RestartPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(RestartPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Invoke action restart + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(RestartPostRequestBody body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(RestartPostRequestBody body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new RestartRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class RestartRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new restartRequestBuilderPostRequestConfiguration and sets the default values. + /// + public RestartRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/Directories/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/Directories/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..8993ae96d60 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/Directories/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Item.Schema.Directories.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/directories/$count{?%24search,%24filter}", pathParameters) { + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/directories/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/Directories/DirectoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/Directories/DirectoriesRequestBuilder.cs new file mode 100644 index 00000000000..6c9aed1dfd9 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/Directories/DirectoriesRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Item.Schema.Directories.Count; +using Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Item.Schema.Directories.Item; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Item.Schema.Directories { + /// + /// Provides operations to manage the directories property of the microsoft.graph.synchronizationSchema entity. + /// + public class DirectoriesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the directories property of the microsoft.graph.synchronizationSchema entity. + public DirectoryDefinitionItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("directoryDefinition%2Did", position); + return new DirectoryDefinitionItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new DirectoriesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DirectoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/directories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new DirectoriesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DirectoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/directories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get directories from servicePrincipals + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryDefinitionCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to directories for servicePrincipals + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(DirectoryDefinition body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(DirectoryDefinition body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get directories from servicePrincipals + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new DirectoriesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to directories for servicePrincipals + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(DirectoryDefinition body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(DirectoryDefinition body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new DirectoriesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get directories from servicePrincipals + /// + public class DirectoriesRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DirectoriesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DirectoriesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DirectoriesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new directoriesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DirectoriesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DirectoriesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new directoriesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public DirectoriesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/Directories/Item/DirectoryDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/Directories/Item/DirectoryDefinitionItemRequestBuilder.cs new file mode 100644 index 00000000000..5dca5c509b7 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/Directories/Item/DirectoryDefinitionItemRequestBuilder.cs @@ -0,0 +1,248 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Item.Schema.Directories.Item.Discover; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Item.Schema.Directories.Item { + /// + /// Provides operations to manage the directories property of the microsoft.graph.synchronizationSchema entity. + /// + public class DirectoryDefinitionItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to call the discover method. + public DiscoverRequestBuilder Discover { get => + new DiscoverRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new DirectoryDefinitionItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DirectoryDefinitionItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/directories/{directoryDefinition%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new DirectoryDefinitionItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DirectoryDefinitionItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/directories/{directoryDefinition%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property directories for servicePrincipals + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get directories from servicePrincipals + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property directories in servicePrincipals + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(DirectoryDefinition body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(DirectoryDefinition body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property directories for servicePrincipals + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new DirectoryDefinitionItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get directories from servicePrincipals + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new DirectoryDefinitionItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property directories in servicePrincipals + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(DirectoryDefinition body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(DirectoryDefinition body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new DirectoryDefinitionItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DirectoryDefinitionItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new DirectoryDefinitionItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public DirectoryDefinitionItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get directories from servicePrincipals + /// + public class DirectoryDefinitionItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DirectoryDefinitionItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DirectoryDefinitionItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DirectoryDefinitionItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new DirectoryDefinitionItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DirectoryDefinitionItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DirectoryDefinitionItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new DirectoryDefinitionItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public DirectoryDefinitionItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/Directories/Item/Discover/DiscoverRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/Directories/Item/Discover/DiscoverRequestBuilder.cs new file mode 100644 index 00000000000..8e1fdd9c22c --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/Directories/Item/Discover/DiscoverRequestBuilder.cs @@ -0,0 +1,91 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Item.Schema.Directories.Item.Discover { + /// + /// Provides operations to call the discover method. + /// + public class DiscoverRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new DiscoverRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DiscoverRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/directories/{directoryDefinition%2Did}/discover", pathParameters) { + } + /// + /// Instantiates a new DiscoverRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DiscoverRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/directories/{directoryDefinition%2Did}/discover", rawUrl) { + } + /// + /// Invoke action discover + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke action discover + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new DiscoverRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DiscoverRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new discoverRequestBuilderPostRequestConfiguration and sets the default values. + /// + public DiscoverRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/FilterOperators/FilterOperatorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/FilterOperators/FilterOperatorsRequestBuilder.cs new file mode 100644 index 00000000000..d81048a9128 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/FilterOperators/FilterOperatorsRequestBuilder.cs @@ -0,0 +1,147 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Item.Schema.FilterOperators { + /// + /// Provides operations to call the filterOperators method. + /// + public class FilterOperatorsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new FilterOperatorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FilterOperatorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/filterOperators(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", pathParameters) { + } + /// + /// Instantiates a new FilterOperatorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FilterOperatorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/filterOperators(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", rawUrl) { + } + /// + /// Invoke function filterOperators + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, FilterOperatorsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke function filterOperators + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new FilterOperatorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Invoke function filterOperators + /// + public class FilterOperatorsRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FilterOperatorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public FilterOperatorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new FilterOperatorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new filterOperatorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public FilterOperatorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/FilterOperators/FilterOperatorsResponse.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/FilterOperators/FilterOperatorsResponse.cs new file mode 100644 index 00000000000..36a141cbba6 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/FilterOperators/FilterOperatorsResponse.cs @@ -0,0 +1,49 @@ +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Item.Schema.FilterOperators { + public class FilterOperatorsResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static new FilterOperatorsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new FilterOperatorsResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(FilterOperatorSchema.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/Functions/FunctionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/Functions/FunctionsRequestBuilder.cs new file mode 100644 index 00000000000..c78aa617a7d --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/Functions/FunctionsRequestBuilder.cs @@ -0,0 +1,147 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Item.Schema.Functions { + /// + /// Provides operations to call the functions method. + /// + public class FunctionsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new FunctionsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FunctionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/functions(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", pathParameters) { + } + /// + /// Instantiates a new FunctionsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FunctionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/functions(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", rawUrl) { + } + /// + /// Invoke function functions + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, FunctionsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke function functions + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new FunctionsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Invoke function functions + /// + public class FunctionsRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FunctionsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public FunctionsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new FunctionsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new functionsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public FunctionsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/Functions/FunctionsResponse.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/Functions/FunctionsResponse.cs new file mode 100644 index 00000000000..00422a68428 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/Functions/FunctionsResponse.cs @@ -0,0 +1,49 @@ +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Item.Schema.Functions { + public class FunctionsResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static new FunctionsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new FunctionsResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(AttributeMappingFunctionSchema.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/ParseExpression/ParseExpressionPostRequestBody.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/ParseExpression/ParseExpressionPostRequestBody.cs new file mode 100644 index 00000000000..fe3c5d3e2de --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/ParseExpression/ParseExpressionPostRequestBody.cs @@ -0,0 +1,96 @@ +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Item.Schema.ParseExpression { + public class ParseExpressionPostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The expression property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Expression { + get { return BackingStore?.Get("expression"); } + set { BackingStore?.Set("expression", value); } + } +#nullable restore +#else + public string Expression { + get { return BackingStore?.Get("expression"); } + set { BackingStore?.Set("expression", value); } + } +#endif + /// The targetAttributeDefinition property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public AttributeDefinition? TargetAttributeDefinition { + get { return BackingStore?.Get("targetAttributeDefinition"); } + set { BackingStore?.Set("targetAttributeDefinition", value); } + } +#nullable restore +#else + public AttributeDefinition TargetAttributeDefinition { + get { return BackingStore?.Get("targetAttributeDefinition"); } + set { BackingStore?.Set("targetAttributeDefinition", value); } + } +#endif + /// The testInputObject property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public ExpressionInputObject? TestInputObject { + get { return BackingStore?.Get("testInputObject"); } + set { BackingStore?.Set("testInputObject", value); } + } +#nullable restore +#else + public ExpressionInputObject TestInputObject { + get { return BackingStore?.Get("testInputObject"); } + set { BackingStore?.Set("testInputObject", value); } + } +#endif + /// + /// Instantiates a new parseExpressionPostRequestBody and sets the default values. + /// + public ParseExpressionPostRequestBody() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static ParseExpressionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ParseExpressionPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"expression", n => { Expression = n.GetStringValue(); } }, + {"targetAttributeDefinition", n => { TargetAttributeDefinition = n.GetObjectValue(AttributeDefinition.CreateFromDiscriminatorValue); } }, + {"testInputObject", n => { TestInputObject = n.GetObjectValue(ExpressionInputObject.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("expression", Expression); + writer.WriteObjectValue("targetAttributeDefinition", TargetAttributeDefinition); + writer.WriteObjectValue("testInputObject", TestInputObject); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/ParseExpression/ParseExpressionRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/ParseExpression/ParseExpressionRequestBuilder.cs new file mode 100644 index 00000000000..e03706cfabc --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/ParseExpression/ParseExpressionRequestBuilder.cs @@ -0,0 +1,96 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Item.Schema.ParseExpression { + /// + /// Provides operations to call the parseExpression method. + /// + public class ParseExpressionRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new ParseExpressionRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ParseExpressionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/parseExpression", pathParameters) { + } + /// + /// Instantiates a new ParseExpressionRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ParseExpressionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema/parseExpression", rawUrl) { + } + /// + /// Invoke action parseExpression + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(ParseExpressionPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(ParseExpressionPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, ParseExpressionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke action parseExpression + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(ParseExpressionPostRequestBody body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(ParseExpressionPostRequestBody body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new ParseExpressionRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ParseExpressionRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new parseExpressionRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ParseExpressionRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/SchemaRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/SchemaRequestBuilder.cs new file mode 100644 index 00000000000..193ba6039cf --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Schema/SchemaRequestBuilder.cs @@ -0,0 +1,263 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Item.Schema.Directories; +using Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Item.Schema.FilterOperators; +using Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Item.Schema.Functions; +using Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Item.Schema.ParseExpression; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Item.Schema { + /// + /// Provides operations to manage the schema property of the microsoft.graph.synchronizationJob entity. + /// + public class SchemaRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the directories property of the microsoft.graph.synchronizationSchema entity. + public DirectoriesRequestBuilder Directories { get => + new DirectoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the filterOperators method. + public FilterOperatorsRequestBuilder FilterOperators { get => + new FilterOperatorsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the functions method. + public FunctionsRequestBuilder Functions { get => + new FunctionsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the parseExpression method. + public ParseExpressionRequestBuilder ParseExpression { get => + new ParseExpressionRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new SchemaRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SchemaRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new SchemaRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SchemaRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs/{synchronizationJob%2Did}/schema{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property schema for servicePrincipals + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get schema from servicePrincipals + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, SynchronizationSchema.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property schema in servicePrincipals + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(SynchronizationSchema body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(SynchronizationSchema body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, SynchronizationSchema.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property schema for servicePrincipals + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new SchemaRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get schema from servicePrincipals + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new SchemaRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property schema in servicePrincipals + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(SynchronizationSchema body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(SynchronizationSchema body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new SchemaRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SchemaRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new schemaRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public SchemaRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get schema from servicePrincipals + /// + public class SchemaRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SchemaRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public SchemaRequestBuilderGetQueryParameters QueryParameters { get; set; } = new SchemaRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new schemaRequestBuilderGetRequestConfiguration and sets the default values. + /// + public SchemaRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SchemaRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new schemaRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public SchemaRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Start/StartRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Start/StartRequestBuilder.cs new file mode 100644 index 00000000000..f5be0c269e7 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/Start/StartRequestBuilder.cs @@ -0,0 +1,89 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Item.Start { + /// + /// Provides operations to call the start method. + /// + public class StartRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new StartRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public StartRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs/{synchronizationJob%2Did}/start", pathParameters) { + } + /// + /// Instantiates a new StartRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public StartRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs/{synchronizationJob%2Did}/start", rawUrl) { + } + /// + /// Invoke action start + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Invoke action start + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new StartRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class StartRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new startRequestBuilderPostRequestConfiguration and sets the default values. + /// + public StartRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/SynchronizationJobItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/SynchronizationJobItemRequestBuilder.cs new file mode 100644 index 00000000000..3c36e3e6903 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/SynchronizationJobItemRequestBuilder.cs @@ -0,0 +1,273 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Item.Pause; +using Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Item.ProvisionOnDemand; +using Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Item.Restart; +using Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Item.Schema; +using Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Item.Start; +using Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Item.ValidateCredentials; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Item { + /// + /// Provides operations to manage the jobs property of the microsoft.graph.synchronization entity. + /// + public class SynchronizationJobItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to call the pause method. + public PauseRequestBuilder Pause { get => + new PauseRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the provisionOnDemand method. + public ProvisionOnDemandRequestBuilder ProvisionOnDemand { get => + new ProvisionOnDemandRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the restart method. + public RestartRequestBuilder Restart { get => + new RestartRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the schema property of the microsoft.graph.synchronizationJob entity. + public SchemaRequestBuilder Schema { get => + new SchemaRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the start method. + public StartRequestBuilder Start { get => + new StartRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the validateCredentials method. + public ValidateCredentialsRequestBuilder ValidateCredentials { get => + new ValidateCredentialsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new SynchronizationJobItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SynchronizationJobItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs/{synchronizationJob%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new SynchronizationJobItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SynchronizationJobItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs/{synchronizationJob%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property jobs for servicePrincipals + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get jobs from servicePrincipals + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, SynchronizationJob.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property jobs in servicePrincipals + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(SynchronizationJob body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(SynchronizationJob body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, SynchronizationJob.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property jobs for servicePrincipals + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new SynchronizationJobItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get jobs from servicePrincipals + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new SynchronizationJobItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property jobs in servicePrincipals + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(SynchronizationJob body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(SynchronizationJob body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new SynchronizationJobItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SynchronizationJobItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new SynchronizationJobItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public SynchronizationJobItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get jobs from servicePrincipals + /// + public class SynchronizationJobItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SynchronizationJobItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public SynchronizationJobItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new SynchronizationJobItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new SynchronizationJobItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public SynchronizationJobItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SynchronizationJobItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new SynchronizationJobItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public SynchronizationJobItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/ValidateCredentials/ValidateCredentialsPostRequestBody.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/ValidateCredentials/ValidateCredentialsPostRequestBody.cs new file mode 100644 index 00000000000..d357a841c3b --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/ValidateCredentials/ValidateCredentialsPostRequestBody.cs @@ -0,0 +1,103 @@ +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Item.ValidateCredentials { + public class ValidateCredentialsPostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// The applicationIdentifier property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ApplicationIdentifier { + get { return BackingStore?.Get("applicationIdentifier"); } + set { BackingStore?.Set("applicationIdentifier", value); } + } +#nullable restore +#else + public string ApplicationIdentifier { + get { return BackingStore?.Get("applicationIdentifier"); } + set { BackingStore?.Set("applicationIdentifier", value); } + } +#endif + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The credentials property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Credentials { + get { return BackingStore?.Get?>("credentials"); } + set { BackingStore?.Set("credentials", value); } + } +#nullable restore +#else + public List Credentials { + get { return BackingStore?.Get>("credentials"); } + set { BackingStore?.Set("credentials", value); } + } +#endif + /// The templateId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TemplateId { + get { return BackingStore?.Get("templateId"); } + set { BackingStore?.Set("templateId", value); } + } +#nullable restore +#else + public string TemplateId { + get { return BackingStore?.Get("templateId"); } + set { BackingStore?.Set("templateId", value); } + } +#endif + /// The useSavedCredentials property + public bool? UseSavedCredentials { + get { return BackingStore?.Get("useSavedCredentials"); } + set { BackingStore?.Set("useSavedCredentials", value); } + } + /// + /// Instantiates a new validateCredentialsPostRequestBody and sets the default values. + /// + public ValidateCredentialsPostRequestBody() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static ValidateCredentialsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ValidateCredentialsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"applicationIdentifier", n => { ApplicationIdentifier = n.GetStringValue(); } }, + {"credentials", n => { Credentials = n.GetCollectionOfObjectValues(SynchronizationSecretKeyStringValuePair.CreateFromDiscriminatorValue)?.ToList(); } }, + {"templateId", n => { TemplateId = n.GetStringValue(); } }, + {"useSavedCredentials", n => { UseSavedCredentials = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("applicationIdentifier", ApplicationIdentifier); + writer.WriteCollectionOfObjectValues("credentials", Credentials); + writer.WriteStringValue("templateId", TemplateId); + writer.WriteBoolValue("useSavedCredentials", UseSavedCredentials); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/ValidateCredentials/ValidateCredentialsRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/ValidateCredentials/ValidateCredentialsRequestBuilder.cs new file mode 100644 index 00000000000..857ab531164 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/Item/ValidateCredentials/ValidateCredentialsRequestBuilder.cs @@ -0,0 +1,94 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Item.ValidateCredentials { + /// + /// Provides operations to call the validateCredentials method. + /// + public class ValidateCredentialsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new ValidateCredentialsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ValidateCredentialsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs/{synchronizationJob%2Did}/validateCredentials", pathParameters) { + } + /// + /// Instantiates a new ValidateCredentialsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ValidateCredentialsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs/{synchronizationJob%2Did}/validateCredentials", rawUrl) { + } + /// + /// Invoke action validateCredentials + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(ValidateCredentialsPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(ValidateCredentialsPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Invoke action validateCredentials + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(ValidateCredentialsPostRequestBody body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(ValidateCredentialsPostRequestBody body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new ValidateCredentialsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ValidateCredentialsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new validateCredentialsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ValidateCredentialsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/JobsRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/JobsRequestBuilder.cs new file mode 100644 index 00000000000..f7c091827b0 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/JobsRequestBuilder.cs @@ -0,0 +1,240 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Count; +using Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.Item; +using Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.ValidateCredentials; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs { + /// + /// Provides operations to manage the jobs property of the microsoft.graph.synchronization entity. + /// + public class JobsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the validateCredentials method. + public ValidateCredentialsRequestBuilder ValidateCredentials { get => + new ValidateCredentialsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the jobs property of the microsoft.graph.synchronization entity. + public SynchronizationJobItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("synchronizationJob%2Did", position); + return new SynchronizationJobItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new JobsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public JobsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new JobsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public JobsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get jobs from servicePrincipals + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, SynchronizationJobCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to jobs for servicePrincipals + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(SynchronizationJob body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(SynchronizationJob body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, SynchronizationJob.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get jobs from servicePrincipals + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new JobsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to jobs for servicePrincipals + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(SynchronizationJob body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(SynchronizationJob body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new JobsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get jobs from servicePrincipals + /// + public class JobsRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class JobsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public JobsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new JobsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new jobsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public JobsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class JobsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new jobsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public JobsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/ValidateCredentials/ValidateCredentialsPostRequestBody.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/ValidateCredentials/ValidateCredentialsPostRequestBody.cs new file mode 100644 index 00000000000..393bd779cf8 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/ValidateCredentials/ValidateCredentialsPostRequestBody.cs @@ -0,0 +1,103 @@ +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.ValidateCredentials { + public class ValidateCredentialsPostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// The applicationIdentifier property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ApplicationIdentifier { + get { return BackingStore?.Get("applicationIdentifier"); } + set { BackingStore?.Set("applicationIdentifier", value); } + } +#nullable restore +#else + public string ApplicationIdentifier { + get { return BackingStore?.Get("applicationIdentifier"); } + set { BackingStore?.Set("applicationIdentifier", value); } + } +#endif + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The credentials property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Credentials { + get { return BackingStore?.Get?>("credentials"); } + set { BackingStore?.Set("credentials", value); } + } +#nullable restore +#else + public List Credentials { + get { return BackingStore?.Get>("credentials"); } + set { BackingStore?.Set("credentials", value); } + } +#endif + /// The templateId property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TemplateId { + get { return BackingStore?.Get("templateId"); } + set { BackingStore?.Set("templateId", value); } + } +#nullable restore +#else + public string TemplateId { + get { return BackingStore?.Get("templateId"); } + set { BackingStore?.Set("templateId", value); } + } +#endif + /// The useSavedCredentials property + public bool? UseSavedCredentials { + get { return BackingStore?.Get("useSavedCredentials"); } + set { BackingStore?.Set("useSavedCredentials", value); } + } + /// + /// Instantiates a new validateCredentialsPostRequestBody and sets the default values. + /// + public ValidateCredentialsPostRequestBody() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static ValidateCredentialsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ValidateCredentialsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"applicationIdentifier", n => { ApplicationIdentifier = n.GetStringValue(); } }, + {"credentials", n => { Credentials = n.GetCollectionOfObjectValues(SynchronizationSecretKeyStringValuePair.CreateFromDiscriminatorValue)?.ToList(); } }, + {"templateId", n => { TemplateId = n.GetStringValue(); } }, + {"useSavedCredentials", n => { UseSavedCredentials = n.GetBoolValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("applicationIdentifier", ApplicationIdentifier); + writer.WriteCollectionOfObjectValues("credentials", Credentials); + writer.WriteStringValue("templateId", TemplateId); + writer.WriteBoolValue("useSavedCredentials", UseSavedCredentials); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/ValidateCredentials/ValidateCredentialsRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/ValidateCredentials/ValidateCredentialsRequestBuilder.cs new file mode 100644 index 00000000000..576602c8c9f --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Jobs/ValidateCredentials/ValidateCredentialsRequestBuilder.cs @@ -0,0 +1,94 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs.ValidateCredentials { + /// + /// Provides operations to call the validateCredentials method. + /// + public class ValidateCredentialsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new ValidateCredentialsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ValidateCredentialsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs/validateCredentials", pathParameters) { + } + /// + /// Instantiates a new ValidateCredentialsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ValidateCredentialsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/jobs/validateCredentials", rawUrl) { + } + /// + /// Invoke action validateCredentials + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(ValidateCredentialsPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(ValidateCredentialsPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Invoke action validateCredentials + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(ValidateCredentialsPostRequestBody body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(ValidateCredentialsPostRequestBody body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new ValidateCredentialsRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ValidateCredentialsRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new validateCredentialsRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ValidateCredentialsRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Secrets/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Secrets/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..54ebccca87b --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Secrets/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Secrets.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/secrets/$count{?%24search,%24filter}", pathParameters) { + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/secrets/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Secrets/SecretsRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Secrets/SecretsRequestBuilder.cs new file mode 100644 index 00000000000..86b219f0ee2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Secrets/SecretsRequestBuilder.cs @@ -0,0 +1,102 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.ServicePrincipals.Item.Synchronization.Secrets.Count; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Secrets { + /// + /// Builds and executes requests for operations under \servicePrincipals\{servicePrincipal-id}\synchronization\secrets + /// + public class SecretsRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new SecretsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SecretsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/secrets", pathParameters) { + } + /// + /// Instantiates a new SecretsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SecretsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/secrets", rawUrl) { + } + /// + /// Update property secrets value. + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> PutAsync(List body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task> PutAsync(List body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, SynchronizationSecretKeyStringValuePair.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + return collectionResult?.ToList(); + } + /// + /// Update property secrets value. + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(List body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(List body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PUT, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new SecretsRequestBuilderPutRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SecretsRequestBuilderPutRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new secretsRequestBuilderPutRequestConfiguration and sets the default values. + /// + public SecretsRequestBuilderPutRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/SynchronizationRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/SynchronizationRequestBuilder.cs new file mode 100644 index 00000000000..14276c72213 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/SynchronizationRequestBuilder.cs @@ -0,0 +1,263 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.ServicePrincipals.Item.Synchronization.AcquireAccessToken; +using Microsoft.Graph.ServicePrincipals.Item.Synchronization.Jobs; +using Microsoft.Graph.ServicePrincipals.Item.Synchronization.Secrets; +using Microsoft.Graph.ServicePrincipals.Item.Synchronization.Templates; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization { + /// + /// Provides operations to manage the synchronization property of the microsoft.graph.servicePrincipal entity. + /// + public class SynchronizationRequestBuilder : BaseRequestBuilder { + /// Provides operations to call the acquireAccessToken method. + public AcquireAccessTokenRequestBuilder AcquireAccessToken { get => + new AcquireAccessTokenRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the jobs property of the microsoft.graph.synchronization entity. + public JobsRequestBuilder Jobs { get => + new JobsRequestBuilder(PathParameters, RequestAdapter); + } + /// The secrets property + public SecretsRequestBuilder Secrets { get => + new SecretsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the templates property of the microsoft.graph.synchronization entity. + public TemplatesRequestBuilder Templates { get => + new TemplatesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new SynchronizationRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SynchronizationRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new SynchronizationRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SynchronizationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property synchronization for servicePrincipals + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get synchronization from servicePrincipals + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.Synchronization.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property synchronization in servicePrincipals + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(Microsoft.Graph.Models.Synchronization body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PutAsync(Microsoft.Graph.Models.Synchronization body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, Microsoft.Graph.Models.Synchronization.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property synchronization for servicePrincipals + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new SynchronizationRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get synchronization from servicePrincipals + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new SynchronizationRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property synchronization in servicePrincipals + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPutRequestInformation(Microsoft.Graph.Models.Synchronization body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(Microsoft.Graph.Models.Synchronization body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PUT, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new SynchronizationRequestBuilderPutRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SynchronizationRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new synchronizationRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public SynchronizationRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get synchronization from servicePrincipals + /// + public class SynchronizationRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SynchronizationRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public SynchronizationRequestBuilderGetQueryParameters QueryParameters { get; set; } = new SynchronizationRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new synchronizationRequestBuilderGetRequestConfiguration and sets the default values. + /// + public SynchronizationRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SynchronizationRequestBuilderPutRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new synchronizationRequestBuilderPutRequestConfiguration and sets the default values. + /// + public SynchronizationRequestBuilderPutRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..b03be082558 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Templates.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/templates/$count{?%24search,%24filter}", pathParameters) { + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/templates/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/Directories/Count/CountRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/Directories/Count/CountRequestBuilder.cs new file mode 100644 index 00000000000..ea7eddec188 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/Directories/Count/CountRequestBuilder.cs @@ -0,0 +1,118 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Templates.Item.Schema.Directories.Count { + /// + /// Provides operations to count the resources in the collection. + /// + public class CountRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CountRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/directories/$count{?%24search,%24filter}", pathParameters) { + } + /// + /// Instantiates a new CountRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/directories/$count{?%24search,%24filter}", rawUrl) { + } + /// + /// Get the number of the resource + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendPrimitiveAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get the number of the resource + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "text/plain"); + if (requestConfiguration != null) { + var requestConfig = new CountRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get the number of the resource + /// + public class CountRequestBuilderGetQueryParameters { + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class CountRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public CountRequestBuilderGetQueryParameters QueryParameters { get; set; } = new CountRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new CountRequestBuilderGetRequestConfiguration and sets the default values. + /// + public CountRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/Directories/DirectoriesRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/Directories/DirectoriesRequestBuilder.cs new file mode 100644 index 00000000000..b1dbd788b7b --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/Directories/DirectoriesRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.ServicePrincipals.Item.Synchronization.Templates.Item.Schema.Directories.Count; +using Microsoft.Graph.ServicePrincipals.Item.Synchronization.Templates.Item.Schema.Directories.Item; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Templates.Item.Schema.Directories { + /// + /// Provides operations to manage the directories property of the microsoft.graph.synchronizationSchema entity. + /// + public class DirectoriesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the directories property of the microsoft.graph.synchronizationSchema entity. + public DirectoryDefinitionItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("directoryDefinition%2Did", position); + return new DirectoryDefinitionItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new DirectoriesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DirectoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/directories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new DirectoriesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DirectoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/directories{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get directories from servicePrincipals + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryDefinitionCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to directories for servicePrincipals + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(DirectoryDefinition body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(DirectoryDefinition body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get directories from servicePrincipals + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new DirectoriesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to directories for servicePrincipals + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(DirectoryDefinition body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(DirectoryDefinition body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new DirectoriesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get directories from servicePrincipals + /// + public class DirectoriesRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DirectoriesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DirectoriesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DirectoriesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new directoriesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DirectoriesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DirectoriesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new directoriesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public DirectoriesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/Directories/Item/DirectoryDefinitionItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/Directories/Item/DirectoryDefinitionItemRequestBuilder.cs new file mode 100644 index 00000000000..fa87ce53555 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/Directories/Item/DirectoryDefinitionItemRequestBuilder.cs @@ -0,0 +1,248 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.ServicePrincipals.Item.Synchronization.Templates.Item.Schema.Directories.Item.Discover; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Templates.Item.Schema.Directories.Item { + /// + /// Provides operations to manage the directories property of the microsoft.graph.synchronizationSchema entity. + /// + public class DirectoryDefinitionItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to call the discover method. + public DiscoverRequestBuilder Discover { get => + new DiscoverRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new DirectoryDefinitionItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DirectoryDefinitionItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/directories/{directoryDefinition%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new DirectoryDefinitionItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DirectoryDefinitionItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/directories/{directoryDefinition%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property directories for servicePrincipals + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get directories from servicePrincipals + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property directories in servicePrincipals + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(DirectoryDefinition body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(DirectoryDefinition body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property directories for servicePrincipals + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new DirectoryDefinitionItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get directories from servicePrincipals + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new DirectoryDefinitionItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property directories in servicePrincipals + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(DirectoryDefinition body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(DirectoryDefinition body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new DirectoryDefinitionItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DirectoryDefinitionItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new DirectoryDefinitionItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public DirectoryDefinitionItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get directories from servicePrincipals + /// + public class DirectoryDefinitionItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DirectoryDefinitionItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public DirectoryDefinitionItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new DirectoryDefinitionItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new DirectoryDefinitionItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public DirectoryDefinitionItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DirectoryDefinitionItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new DirectoryDefinitionItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public DirectoryDefinitionItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/Directories/Item/Discover/DiscoverRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/Directories/Item/Discover/DiscoverRequestBuilder.cs new file mode 100644 index 00000000000..577d0a56394 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/Directories/Item/Discover/DiscoverRequestBuilder.cs @@ -0,0 +1,91 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Templates.Item.Schema.Directories.Item.Discover { + /// + /// Provides operations to call the discover method. + /// + public class DiscoverRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new DiscoverRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DiscoverRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/directories/{directoryDefinition%2Did}/discover", pathParameters) { + } + /// + /// Instantiates a new DiscoverRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public DiscoverRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/directories/{directoryDefinition%2Did}/discover", rawUrl) { + } + /// + /// Invoke action discover + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, DirectoryDefinition.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke action discover + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new DiscoverRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class DiscoverRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new discoverRequestBuilderPostRequestConfiguration and sets the default values. + /// + public DiscoverRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/FilterOperators/FilterOperatorsRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/FilterOperators/FilterOperatorsRequestBuilder.cs new file mode 100644 index 00000000000..4bfbe103c95 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/FilterOperators/FilterOperatorsRequestBuilder.cs @@ -0,0 +1,147 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Templates.Item.Schema.FilterOperators { + /// + /// Provides operations to call the filterOperators method. + /// + public class FilterOperatorsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new FilterOperatorsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FilterOperatorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/filterOperators(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", pathParameters) { + } + /// + /// Instantiates a new FilterOperatorsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FilterOperatorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/filterOperators(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", rawUrl) { + } + /// + /// Invoke function filterOperators + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, FilterOperatorsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke function filterOperators + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new FilterOperatorsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Invoke function filterOperators + /// + public class FilterOperatorsRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FilterOperatorsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public FilterOperatorsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new FilterOperatorsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new filterOperatorsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public FilterOperatorsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/FilterOperators/FilterOperatorsResponse.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/FilterOperators/FilterOperatorsResponse.cs new file mode 100644 index 00000000000..7279468d048 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/FilterOperators/FilterOperatorsResponse.cs @@ -0,0 +1,49 @@ +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Templates.Item.Schema.FilterOperators { + public class FilterOperatorsResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static new FilterOperatorsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new FilterOperatorsResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(FilterOperatorSchema.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/Functions/FunctionsRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/Functions/FunctionsRequestBuilder.cs new file mode 100644 index 00000000000..b8803e362ca --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/Functions/FunctionsRequestBuilder.cs @@ -0,0 +1,147 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Templates.Item.Schema.Functions { + /// + /// Provides operations to call the functions method. + /// + public class FunctionsRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new FunctionsRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public FunctionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/functions(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", pathParameters) { + } + /// + /// Instantiates a new FunctionsRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public FunctionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/functions(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", rawUrl) { + } + /// + /// Invoke function functions + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, FunctionsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke function functions + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new FunctionsRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Invoke function functions + /// + public class FunctionsRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class FunctionsRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public FunctionsRequestBuilderGetQueryParameters QueryParameters { get; set; } = new FunctionsRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new functionsRequestBuilderGetRequestConfiguration and sets the default values. + /// + public FunctionsRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/Functions/FunctionsResponse.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/Functions/FunctionsResponse.cs new file mode 100644 index 00000000000..afdcce4d199 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/Functions/FunctionsResponse.cs @@ -0,0 +1,49 @@ +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Templates.Item.Schema.Functions { + public class FunctionsResponse : BaseCollectionPaginationCountResponse, IParsable { + /// The value property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Value { + get { return BackingStore?.Get?>("value"); } + set { BackingStore?.Set("value", value); } + } +#nullable restore +#else + public List Value { + get { return BackingStore?.Get>("value"); } + set { BackingStore?.Set("value", value); } + } +#endif + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static new FunctionsResponse CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new FunctionsResponse(); + } + /// + /// The deserialization information for the current model + /// + public new IDictionary> GetFieldDeserializers() { + return new Dictionary>(base.GetFieldDeserializers()) { + {"value", n => { Value = n.GetCollectionOfObjectValues(AttributeMappingFunctionSchema.CreateFromDiscriminatorValue)?.ToList(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public new void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + base.Serialize(writer); + writer.WriteCollectionOfObjectValues("value", Value); + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/ParseExpression/ParseExpressionPostRequestBody.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/ParseExpression/ParseExpressionPostRequestBody.cs new file mode 100644 index 00000000000..f130f953e88 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/ParseExpression/ParseExpressionPostRequestBody.cs @@ -0,0 +1,96 @@ +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions.Store; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Templates.Item.Schema.ParseExpression { + public class ParseExpressionPostRequestBody : IAdditionalDataHolder, IBackedModel, IParsable { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { + get { return BackingStore?.Get>("additionalData"); } + set { BackingStore?.Set("additionalData", value); } + } + /// Stores model information. + public IBackingStore BackingStore { get; private set; } + /// The expression property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Expression { + get { return BackingStore?.Get("expression"); } + set { BackingStore?.Set("expression", value); } + } +#nullable restore +#else + public string Expression { + get { return BackingStore?.Get("expression"); } + set { BackingStore?.Set("expression", value); } + } +#endif + /// The targetAttributeDefinition property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public AttributeDefinition? TargetAttributeDefinition { + get { return BackingStore?.Get("targetAttributeDefinition"); } + set { BackingStore?.Set("targetAttributeDefinition", value); } + } +#nullable restore +#else + public AttributeDefinition TargetAttributeDefinition { + get { return BackingStore?.Get("targetAttributeDefinition"); } + set { BackingStore?.Set("targetAttributeDefinition", value); } + } +#endif + /// The testInputObject property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public ExpressionInputObject? TestInputObject { + get { return BackingStore?.Get("testInputObject"); } + set { BackingStore?.Set("testInputObject", value); } + } +#nullable restore +#else + public ExpressionInputObject TestInputObject { + get { return BackingStore?.Get("testInputObject"); } + set { BackingStore?.Set("testInputObject", value); } + } +#endif + /// + /// Instantiates a new parseExpressionPostRequestBody and sets the default values. + /// + public ParseExpressionPostRequestBody() { + BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// The parse node to use to read the discriminator value and create the object + public static ParseExpressionPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new ParseExpressionPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + public IDictionary> GetFieldDeserializers() { + return new Dictionary> { + {"expression", n => { Expression = n.GetStringValue(); } }, + {"targetAttributeDefinition", n => { TargetAttributeDefinition = n.GetObjectValue(AttributeDefinition.CreateFromDiscriminatorValue); } }, + {"testInputObject", n => { TestInputObject = n.GetObjectValue(ExpressionInputObject.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public void Serialize(ISerializationWriter writer) { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("expression", Expression); + writer.WriteObjectValue("targetAttributeDefinition", TargetAttributeDefinition); + writer.WriteObjectValue("testInputObject", TestInputObject); + writer.WriteAdditionalData(AdditionalData); + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/ParseExpression/ParseExpressionRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/ParseExpression/ParseExpressionRequestBuilder.cs new file mode 100644 index 00000000000..918b4a53df3 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/ParseExpression/ParseExpressionRequestBuilder.cs @@ -0,0 +1,96 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Templates.Item.Schema.ParseExpression { + /// + /// Provides operations to call the parseExpression method. + /// + public class ParseExpressionRequestBuilder : BaseRequestBuilder { + /// + /// Instantiates a new ParseExpressionRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ParseExpressionRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/parseExpression", pathParameters) { + } + /// + /// Instantiates a new ParseExpressionRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public ParseExpressionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema/parseExpression", rawUrl) { + } + /// + /// Invoke action parseExpression + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(ParseExpressionPostRequestBody body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(ParseExpressionPostRequestBody body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, ParseExpressionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Invoke action parseExpression + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(ParseExpressionPostRequestBody body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(ParseExpressionPostRequestBody body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new ParseExpressionRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class ParseExpressionRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new parseExpressionRequestBuilderPostRequestConfiguration and sets the default values. + /// + public ParseExpressionRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/SchemaRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/SchemaRequestBuilder.cs new file mode 100644 index 00000000000..e51468a87e2 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/Schema/SchemaRequestBuilder.cs @@ -0,0 +1,263 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.ServicePrincipals.Item.Synchronization.Templates.Item.Schema.Directories; +using Microsoft.Graph.ServicePrincipals.Item.Synchronization.Templates.Item.Schema.FilterOperators; +using Microsoft.Graph.ServicePrincipals.Item.Synchronization.Templates.Item.Schema.Functions; +using Microsoft.Graph.ServicePrincipals.Item.Synchronization.Templates.Item.Schema.ParseExpression; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Templates.Item.Schema { + /// + /// Provides operations to manage the schema property of the microsoft.graph.synchronizationTemplate entity. + /// + public class SchemaRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the directories property of the microsoft.graph.synchronizationSchema entity. + public DirectoriesRequestBuilder Directories { get => + new DirectoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the filterOperators method. + public FilterOperatorsRequestBuilder FilterOperators { get => + new FilterOperatorsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the functions method. + public FunctionsRequestBuilder Functions { get => + new FunctionsRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to call the parseExpression method. + public ParseExpressionRequestBuilder ParseExpression { get => + new ParseExpressionRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new SchemaRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SchemaRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new SchemaRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SchemaRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/templates/{synchronizationTemplate%2Did}/schema{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property schema for servicePrincipals + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get schema from servicePrincipals + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, SynchronizationSchema.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property schema in servicePrincipals + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(SynchronizationSchema body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(SynchronizationSchema body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, SynchronizationSchema.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property schema for servicePrincipals + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new SchemaRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get schema from servicePrincipals + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new SchemaRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property schema in servicePrincipals + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(SynchronizationSchema body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(SynchronizationSchema body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new SchemaRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SchemaRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new schemaRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public SchemaRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get schema from servicePrincipals + /// + public class SchemaRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SchemaRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public SchemaRequestBuilderGetQueryParameters QueryParameters { get; set; } = new SchemaRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new schemaRequestBuilderGetRequestConfiguration and sets the default values. + /// + public SchemaRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SchemaRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new schemaRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public SchemaRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/SynchronizationTemplateItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/SynchronizationTemplateItemRequestBuilder.cs new file mode 100644 index 00000000000..da7ed383f7d --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/Item/SynchronizationTemplateItemRequestBuilder.cs @@ -0,0 +1,248 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.ServicePrincipals.Item.Synchronization.Templates.Item.Schema; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Templates.Item { + /// + /// Provides operations to manage the templates property of the microsoft.graph.synchronization entity. + /// + public class SynchronizationTemplateItemRequestBuilder : BaseRequestBuilder { + /// Provides operations to manage the schema property of the microsoft.graph.synchronizationTemplate entity. + public SchemaRequestBuilder Schema { get => + new SchemaRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new SynchronizationTemplateItemRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SynchronizationTemplateItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/templates/{synchronizationTemplate%2Did}{?%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new SynchronizationTemplateItemRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public SynchronizationTemplateItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/templates/{synchronizationTemplate%2Did}{?%24select,%24expand}", rawUrl) { + } + /// + /// Delete navigation property templates for servicePrincipals + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task DeleteAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken); + } + /// + /// Get templates from servicePrincipals + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, SynchronizationTemplate.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Update the navigation property templates in servicePrincipals + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(SynchronizationTemplate body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PatchAsync(SynchronizationTemplate body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, SynchronizationTemplate.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Delete navigation property templates for servicePrincipals + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToDeleteRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.DELETE, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + if (requestConfiguration != null) { + var requestConfig = new SynchronizationTemplateItemRequestBuilderDeleteRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get templates from servicePrincipals + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new SynchronizationTemplateItemRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Update the navigation property templates in servicePrincipals + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPatchRequestInformation(SynchronizationTemplate body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(SynchronizationTemplate body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.PATCH, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new SynchronizationTemplateItemRequestBuilderPatchRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SynchronizationTemplateItemRequestBuilderDeleteRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new SynchronizationTemplateItemRequestBuilderDeleteRequestConfiguration and sets the default values. + /// + public SynchronizationTemplateItemRequestBuilderDeleteRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Get templates from servicePrincipals + /// + public class SynchronizationTemplateItemRequestBuilderGetQueryParameters { + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SynchronizationTemplateItemRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public SynchronizationTemplateItemRequestBuilderGetQueryParameters QueryParameters { get; set; } = new SynchronizationTemplateItemRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new SynchronizationTemplateItemRequestBuilderGetRequestConfiguration and sets the default values. + /// + public SynchronizationTemplateItemRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class SynchronizationTemplateItemRequestBuilderPatchRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new SynchronizationTemplateItemRequestBuilderPatchRequestConfiguration and sets the default values. + /// + public SynchronizationTemplateItemRequestBuilderPatchRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/TemplatesRequestBuilder.cs b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/TemplatesRequestBuilder.cs new file mode 100644 index 00000000000..6a123afaa74 --- /dev/null +++ b/src/Microsoft.Graph/Generated/ServicePrincipals/Item/Synchronization/Templates/TemplatesRequestBuilder.cs @@ -0,0 +1,235 @@ +using Microsoft.Graph.Models.ODataErrors; +using Microsoft.Graph.Models; +using Microsoft.Graph.ServicePrincipals.Item.Synchronization.Templates.Count; +using Microsoft.Graph.ServicePrincipals.Item.Synchronization.Templates.Item; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace Microsoft.Graph.ServicePrincipals.Item.Synchronization.Templates { + /// + /// Provides operations to manage the templates property of the microsoft.graph.synchronization entity. + /// + public class TemplatesRequestBuilder : BaseRequestBuilder { + /// Provides operations to count the resources in the collection. + public CountRequestBuilder Count { get => + new CountRequestBuilder(PathParameters, RequestAdapter); + } + /// Provides operations to manage the templates property of the microsoft.graph.synchronization entity. + public SynchronizationTemplateItemRequestBuilder this[string position] { get { + var urlTplParams = new Dictionary(PathParameters); + if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("synchronizationTemplate%2Did", position); + return new SynchronizationTemplateItemRequestBuilder(urlTplParams, RequestAdapter); + } } + /// + /// Instantiates a new TemplatesRequestBuilder and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public TemplatesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/templates{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", pathParameters) { + } + /// + /// Instantiates a new TemplatesRequestBuilder and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public TemplatesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/templates{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { + } + /// + /// Get templates from servicePrincipals + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task GetAsync(Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, SynchronizationTemplateCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Create new navigation property to templates for servicePrincipals + /// + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(SynchronizationTemplate body, Action? requestConfiguration = default, CancellationToken cancellationToken = default) { +#nullable restore +#else + public async Task PostAsync(SynchronizationTemplate body, Action requestConfiguration = default, CancellationToken cancellationToken = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> { + {"4XX", ODataError.CreateFromDiscriminatorValue}, + {"5XX", ODataError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, SynchronizationTemplate.CreateFromDiscriminatorValue, errorMapping, cancellationToken); + } + /// + /// Get templates from servicePrincipals + /// + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToGetRequestInformation(Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action requestConfiguration = default) { +#endif + var requestInfo = new RequestInformation { + HttpMethod = Method.GET, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + if (requestConfiguration != null) { + var requestConfig = new TemplatesRequestBuilderGetRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddQueryParameters(requestConfig.QueryParameters); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Create new navigation property to templates for servicePrincipals + /// + /// The request body + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public RequestInformation ToPostRequestInformation(SynchronizationTemplate body, Action? requestConfiguration = default) { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(SynchronizationTemplate body, Action requestConfiguration = default) { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation { + HttpMethod = Method.POST, + UrlTemplate = UrlTemplate, + PathParameters = PathParameters, + }; + requestInfo.Headers.Add("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + if (requestConfiguration != null) { + var requestConfig = new TemplatesRequestBuilderPostRequestConfiguration(); + requestConfiguration.Invoke(requestConfig); + requestInfo.AddRequestOptions(requestConfig.Options); + requestInfo.AddHeaders(requestConfig.Headers); + } + return requestInfo; + } + /// + /// Get templates from servicePrincipals + /// + public class TemplatesRequestBuilderGetQueryParameters { + /// Include count of items + [QueryParameter("%24count")] + public bool? Count { get; set; } + /// Expand related entities +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24expand")] + public string[]? Expand { get; set; } +#nullable restore +#else + [QueryParameter("%24expand")] + public string[] Expand { get; set; } +#endif + /// Filter items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24filter")] + public string? Filter { get; set; } +#nullable restore +#else + [QueryParameter("%24filter")] + public string Filter { get; set; } +#endif + /// Order items by property values +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24orderby")] + public string[]? Orderby { get; set; } +#nullable restore +#else + [QueryParameter("%24orderby")] + public string[] Orderby { get; set; } +#endif + /// Search items by search phrases +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24search")] + public string? Search { get; set; } +#nullable restore +#else + [QueryParameter("%24search")] + public string Search { get; set; } +#endif + /// Select properties to be returned +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("%24select")] + public string[]? Select { get; set; } +#nullable restore +#else + [QueryParameter("%24select")] + public string[] Select { get; set; } +#endif + /// Skip the first n items + [QueryParameter("%24skip")] + public int? Skip { get; set; } + /// Show only the first n items + [QueryParameter("%24top")] + public int? Top { get; set; } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TemplatesRequestBuilderGetRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// Request query parameters + public TemplatesRequestBuilderGetQueryParameters QueryParameters { get; set; } = new TemplatesRequestBuilderGetQueryParameters(); + /// + /// Instantiates a new templatesRequestBuilderGetRequestConfiguration and sets the default values. + /// + public TemplatesRequestBuilderGetRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + /// + /// Configuration for the request such as headers, query parameters, and middleware options. + /// + public class TemplatesRequestBuilderPostRequestConfiguration { + /// Request headers + public RequestHeaders Headers { get; set; } + /// Request options + public IList Options { get; set; } + /// + /// Instantiates a new templatesRequestBuilderPostRequestConfiguration and sets the default values. + /// + public TemplatesRequestBuilderPostRequestConfiguration() { + Options = new List(); + Headers = new RequestHeaders(); + } + } + } +} diff --git a/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/ListItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/ListItemRequestBuilder.cs index 12c1a53e059..9a634320542 100644 --- a/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/ListItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Sites/Item/Lists/Item/ListItemRequestBuilder.cs @@ -87,8 +87,8 @@ public async Task DeleteAsync(Action - /// Returns the metadata for a [list][]. - /// Find more info here + /// Get a list of rich long-running operations associated with a list. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -152,7 +152,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Returns the metadata for a [list][]. + /// Get a list of rich long-running operations associated with a list. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -222,7 +222,7 @@ public ListItemRequestBuilderDeleteRequestConfiguration() { } } /// - /// Returns the metadata for a [list][]. + /// Get a list of rich long-running operations associated with a list. /// public class ListItemRequestBuilderGetQueryParameters { /// Expand related entities diff --git a/src/Microsoft.Graph/Generated/Sites/SitesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Sites/SitesRequestBuilder.cs index fd394eceb5f..e12215ec27d 100644 --- a/src/Microsoft.Graph/Generated/Sites/SitesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Sites/SitesRequestBuilder.cs @@ -55,7 +55,7 @@ public SitesRequestBuilder(Dictionary pathParameters, IRequestAd public SitesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/sites{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { } /// - /// List all available sites][] in an organization. Specific filter criteria and query options are also supported and described below: In addition, you can use a **[$search][]** query against the `/sites` collection to find sites matching given keywords. For more guidance about building applications that use site discovery for scanning purposes, see [Best practices for discovering files and detecting changes at scale. + /// List all available [sites][] in an organization. Specific filter criteria and query options are also supported and described below: In addition, you can use a **[$search][]** query against the `/sites` collection to find sites matching given keywords.If you want to list all sites across all geographies, refer to getAllSites][]. For more guidance about building applications that use site discovery for scanning purposes, see [Best practices for discovering files and detecting changes at scale. /// Find more info here /// /// Cancellation token to use when cancelling requests @@ -75,7 +75,7 @@ public async Task GetAsync(Action(requestInfo, SiteCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// List all available sites][] in an organization. Specific filter criteria and query options are also supported and described below: In addition, you can use a **[$search][]** query against the `/sites` collection to find sites matching given keywords. For more guidance about building applications that use site discovery for scanning purposes, see [Best practices for discovering files and detecting changes at scale. + /// List all available [sites][] in an organization. Specific filter criteria and query options are also supported and described below: In addition, you can use a **[$search][]** query against the `/sites` collection to find sites matching given keywords.If you want to list all sites across all geographies, refer to getAllSites][]. For more guidance about building applications that use site discovery for scanning purposes, see [Best practices for discovering files and detecting changes at scale. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -101,7 +101,7 @@ public RequestInformation ToGetRequestInformation(Action - /// List all available sites][] in an organization. Specific filter criteria and query options are also supported and described below: In addition, you can use a **[$search][]** query against the `/sites` collection to find sites matching given keywords. For more guidance about building applications that use site discovery for scanning purposes, see [Best practices for discovering files and detecting changes at scale. + /// List all available [sites][] in an organization. Specific filter criteria and query options are also supported and described below: In addition, you can use a **[$search][]** query against the `/sites` collection to find sites matching given keywords.If you want to list all sites across all geographies, refer to getAllSites][]. For more guidance about building applications that use site discovery for scanning purposes, see [Best practices for discovering files and detecting changes at scale. /// public class SitesRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs index 33acdc21636..57ce78fb64d 100644 --- a/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Create a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new reply to a chatMessage in a specified channel. + /// Create a new reply to a chatMessage in a specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs index a1880dc674b..240fc535b73 100644 --- a/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs index ea4eb0bf5c4..75503809356 100644 --- a/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Create a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new reply to a chatMessage in a specified channel. + /// Create a new reply to a chatMessage in a specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs index c73a9a6eeae..21aa351bf54 100644 --- a/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs index b6cd815dcf0..e7f457c15b0 100644 --- a/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Create a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new reply to a chatMessage in a specified channel. + /// Create a new reply to a chatMessage in a specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs index d3039965c29..3aab159971b 100644 --- a/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Teamwork/DeletedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs index 085680a1de8..eed0ebe24d3 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Create a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new reply to a chatMessage in a specified channel. + /// Create a new reply to a chatMessage in a specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/Messages/MessagesRequestBuilder.cs index 951b99649d0..e336fe61753 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Chats/Item/Messages/MessagesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs index 5d44e0b4a3f..7310955e2e5 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Create a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new reply to a chatMessage in a specified channel. + /// Create a new reply to a chatMessage in a specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs index 5d17dfc8d94..36d21edda28 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/Channels/Item/Messages/MessagesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs index 0c36bbbc723..94e39b249dc 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Messages/Item/Replies/RepliesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new reply to a chatMessage in a specified channel. - /// Find more info here + /// Create a new reply to a chatMessage in a specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new reply to a chatMessage in a specified channel. + /// Create a new reply to a chatMessage in a specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs index ddf2a5045cd..a9b3d527337 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/JoinedTeams/Item/PrimaryChannel/Messages/MessagesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, ChatMessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Send a new chatMessage in the specified channel or a chat. - /// Find more info here + /// Send a new chatMessage in the specified channel. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Send a new chatMessage in the specified channel or a chat. + /// Send a new chatMessage in the specified channel. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/MailFolders/Item/MailFolderItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/MailFolders/Item/MailFolderItemRequestBuilder.cs index 24a25466a3d..f6ad8c0db3e 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/MailFolders/Item/MailFolderItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/MailFolders/Item/MailFolderItemRequestBuilder.cs @@ -93,8 +93,8 @@ public async Task GetAsync(Action(requestInfo, MailFolder.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Update the properties of mailfolder object. - /// Find more info here + /// Update the writable properties of a mailSearchFolder object. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -165,7 +165,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Update the properties of mailfolder object. + /// Update the writable properties of a mailSearchFolder object. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/Messages/Item/MessageItemRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Messages/Item/MessageItemRequestBuilder.cs index b86f6e3ade6..c2b6b7a0678 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Messages/Item/MessageItemRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Messages/Item/MessageItemRequestBuilder.cs @@ -109,7 +109,7 @@ public async Task DeleteAsync(Action /// The messages in a mailbox or folder. Read-only. Nullable. - /// Find more info here + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/Item/Messages/MessagesRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/Item/Messages/MessagesRequestBuilder.cs index ef67773c3c6..ccb98dc3bd9 100644 --- a/src/Microsoft.Graph/Generated/Users/Item/Messages/MessagesRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/Item/Messages/MessagesRequestBuilder.cs @@ -65,8 +65,8 @@ public async Task GetAsync(Action(requestInfo, MessageCollectionResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. See known limitations of open extensions for more information. The table in the Permissions section lists the resources that support open extensions. - /// Find more info here + /// Create a draft of a new message in either JSON or MIME format. When using JSON format, you can:- Include an attachment to the **message**.- Update the draft later to add content to the **body** or change other message properties. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in **base64** format in the request body.- /* Add any attachments and S/MIME properties to the MIME content. By default, this operation saves the draft in the Drafts folder. Send the draft message in a subsequent operation. Alternatively, send a new message in a single operation, or create a draft to forward, reply and reply-all to an existing message. + /// Find more info here /// /// The request body /// Cancellation token to use when cancelling requests @@ -113,7 +113,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. See known limitations of open extensions for more information. The table in the Permissions section lists the resources that support open extensions. + /// Create a draft of a new message in either JSON or MIME format. When using JSON format, you can:- Include an attachment to the **message**.- Update the draft later to add content to the **body** or change other message properties. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in **base64** format in the request body.- /* Add any attachments and S/MIME properties to the MIME content. By default, this operation saves the draft in the Drafts folder. Send the draft message in a subsequent operation. Alternatively, send a new message in a single operation, or create a draft to forward, reply and reply-all to an existing message. /// /// The request body /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/Microsoft.Graph/Generated/Users/UsersRequestBuilder.cs b/src/Microsoft.Graph/Generated/Users/UsersRequestBuilder.cs index f29c43277a3..dbd020406f0 100644 --- a/src/Microsoft.Graph/Generated/Users/UsersRequestBuilder.cs +++ b/src/Microsoft.Graph/Generated/Users/UsersRequestBuilder.cs @@ -60,8 +60,8 @@ public UsersRequestBuilder(Dictionary pathParameters, IRequestAd public UsersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/users{?%24top,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", rawUrl) { } /// - /// Retrieve the properties and relationships of user object. - /// Find more info here + /// Retrieve a list of user objects. + /// Find more info here /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. @@ -102,7 +102,7 @@ public async Task GetAsync(Action(requestInfo, Microsoft.Graph.Models.User.CreateFromDiscriminatorValue, errorMapping, cancellationToken); } /// - /// Retrieve the properties and relationships of user object. + /// Retrieve a list of user objects. /// /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -156,7 +156,7 @@ public RequestInformation ToPostRequestInformation(Microsoft.Graph.Models.User b return requestInfo; } /// - /// Retrieve the properties and relationships of user object. + /// Retrieve a list of user objects. /// public class UsersRequestBuilderGetQueryParameters { /// Include count of items diff --git a/src/Microsoft.Graph/Generated/kiota-lock.json b/src/Microsoft.Graph/Generated/kiota-lock.json index d4f941eb0e8..a34b59c3813 100644 --- a/src/Microsoft.Graph/Generated/kiota-lock.json +++ b/src/Microsoft.Graph/Generated/kiota-lock.json @@ -1,8 +1,8 @@ { - "descriptionHash": "1EBB1440A374B7AE8C7029FADE77B21AF7A8022EA2CCB40FEF0B2C7A01771379A81F0727C3632E299EEDCE2087050EFF8602924563469A1ED402A33A237A602F", + "descriptionHash": "18582DB6C5E13E8DE4FDF9AE782EBEE3E5DFE8BE3E1199CFC24BAB6621792FCC8252C99BA8B0D69CBB08251AEC2D4D5CE8A6911AB14DE3EF0C9F993E77D982FC", "descriptionLocation": "/mnt/vss/_work/1/s/msgraph-metadata/clean_v10_openapi/openapi.yaml", "lockFileVersion": "1.0.0", - "kiotaVersion": "1.2.0", + "kiotaVersion": "1.2.1", "clientClassName": "BaseGraphServiceClient", "clientNamespaceName": "Microsoft.Graph", "language": "CSharp",