From c914a6da573a2e9d4d396f81de66f6ca98060922 Mon Sep 17 00:00:00 2001 From: azure-sdk Date: Wed, 4 Mar 2026 13:18:39 +0000 Subject: [PATCH] Configurations: 'specification/botservice/resource-manager/Microsoft.BotService/BotService/tspconfig.yaml', API Version: 2023-09-15-preview, SDK Release Type: beta, and CommitSHA: '98a4db5d6c32ff5a3ad5780fce6c716cafdbbeec' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=5959842 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. --- .../CHANGELOG.md | 436 +++++++- .../README.md | 8 +- .../SAMPLE.md | 489 ++++++--- .../azure-resourcemanager-botservice/pom.xml | 8 +- .../botservice/BotServiceManager.java | 153 ++- .../fluent/BotConnectionsClient.java | 122 +-- ...e.java => BotServiceManagementClient.java} | 78 +- .../botservice/fluent/BotsClient.java | 70 +- .../botservice/fluent/ChannelsClient.java | 104 +- .../botservice/fluent/DirectLinesClient.java | 6 +- .../botservice/fluent/EmailsClient.java | 44 + .../botservice/fluent/HostSettingsClient.java | 2 +- ...SecurityPerimeterConfigurationsClient.java | 151 +++ .../fluent/OperationResultsClient.java | 69 ++ .../botservice/fluent/OperationsClient.java | 6 +- .../PrivateEndpointConnectionsClient.java | 145 +++ .../fluent/PrivateLinkResourcesClient.java | 44 + .../fluent/QnAMakerEndpointKeysClient.java | 43 + .../fluent/models/BotChannelInner.java | 130 ++- .../botservice/fluent/models/BotInner.java | 119 ++- ...heckNameAvailabilityResponseBodyInner.java | 49 +- .../fluent/models/ConnectionSettingInner.java | 119 ++- .../CreateEmailSignInUrlResponseInner.java | 110 ++ .../models/HostSettingsResponseInner.java | 108 +- .../ListChannelWithKeysResponseInner.java | 152 +-- ...rkSecurityPerimeterConfigurationInner.java | 146 +++ .../fluent/models/OperationEntityInner.java | 76 +- .../OperationResultsDescriptionInner.java | 127 +++ .../PrivateEndpointConnectionInner.java | 230 +++++ .../PrivateEndpointConnectionProperties.java | 170 ++++ .../PrivateLinkResourceListResultInner.java | 79 ++ .../models/PrivateLinkResourceProperties.java | 111 +++ .../QnAMakerEndpointKeysResponseInner.java | 126 +++ .../ServiceProviderResponseListInner.java | 30 +- .../fluent/models/package-info.java | 4 +- .../botservice/fluent/package-info.java | 4 +- .../implementation/BotChannelImpl.java | 15 +- .../BotConnectionsClientImpl.java | 936 ++++++------------ .../implementation/BotConnectionsImpl.java | 76 +- .../botservice/implementation/BotImpl.java | 15 +- ...=> BotServiceManagementClientBuilder.java} | 62 +- ...va => BotServiceManagementClientImpl.java} | 204 +++- .../implementation/BotsClientImpl.java | 821 ++++++--------- .../botservice/implementation/BotsImpl.java | 20 +- .../implementation/ChannelsClientImpl.java | 813 ++++++--------- .../implementation/ChannelsImpl.java | 62 +- ...CheckNameAvailabilityResponseBodyImpl.java | 2 +- .../implementation/ConnectionSettingImpl.java | 15 +- .../CreateEmailSignInUrlResponseImpl.java | 41 + .../implementation/DirectLinesClientImpl.java | 123 +-- .../implementation/DirectLinesImpl.java | 2 +- .../implementation/EmailsClientImpl.java | 149 +++ .../botservice/implementation/EmailsImpl.java | 56 ++ .../HostSettingsClientImpl.java | 62 +- .../implementation/HostSettingsImpl.java | 2 +- .../HostSettingsResponseImpl.java | 2 +- .../ListChannelWithKeysResponseImpl.java | 15 +- ...orkSecurityPerimeterConfigurationImpl.java | 50 + ...rityPerimeterConfigurationsClientImpl.java | 613 ++++++++++++ ...rkSecurityPerimeterConfigurationsImpl.java | 97 ++ .../implementation/OperationEntityImpl.java | 5 +- .../OperationResultsClientImpl.java | 232 +++++ .../OperationResultsDescriptionImpl.java | 46 + .../implementation/OperationResultsImpl.java | 52 + .../implementation/OperationsClientImpl.java | 143 +-- .../implementation/OperationsImpl.java | 2 +- .../PrivateEndpointConnectionImpl.java | 141 +++ .../PrivateEndpointConnectionsClientImpl.java | 587 +++++++++++ .../PrivateEndpointConnectionsImpl.java | 168 ++++ .../PrivateLinkResourceListResultImpl.java | 40 + .../PrivateLinkResourcesClientImpl.java | 150 +++ .../PrivateLinkResourcesImpl.java | 58 ++ .../QnAMakerEndpointKeysClientImpl.java | 145 +++ .../QnAMakerEndpointKeysImpl.java | 57 ++ .../QnAMakerEndpointKeysResponseImpl.java | 44 + .../implementation/ResourceManagerUtils.java | 2 +- .../ServiceProviderResponseListImpl.java | 2 +- .../models/BotResponseList.java | 57 +- .../models/ChannelResponseList.java | 57 +- .../models/ConnectionSettingResponseList.java | 57 +- ...orkSecurityPerimeterConfigurationList.java | 97 ++ .../models/OperationEntityListResult.java | 52 +- .../PrivateEndpointConnectionListResult.java | 97 ++ .../implementation/package-info.java | 4 +- .../botservice/models/AccessMode.java | 56 ++ .../botservice/models/AcsChatChannel.java | 11 +- .../botservice/models/AlexaChannel.java | 14 +- .../models/AlexaChannelProperties.java | 18 +- .../botservice/models/Bot.java | 93 +- .../botservice/models/BotChannel.java | 28 +- .../botservice/models/BotConnections.java | 96 +- .../botservice/models/BotProperties.java | 87 +- .../botservice/models/Bots.java | 40 +- .../botservice/models/Channel.java | 10 +- .../botservice/models/ChannelName.java | 2 +- .../botservice/models/ChannelSettings.java | 130 +-- .../botservice/models/Channels.java | 96 +- .../CheckNameAvailabilityRequestBody.java | 10 +- .../CheckNameAvailabilityResponseBody.java | 2 +- .../botservice/models/ConnectionSetting.java | 93 +- .../models/ConnectionSettingParameter.java | 10 +- .../models/ConnectionSettingProperties.java | 71 +- .../models/CreateEmailSignInUrlResponse.java | 40 + ...reateEmailSignInUrlResponseProperties.java | 76 ++ .../botservice/models/DirectLineChannel.java | 14 +- .../models/DirectLineChannelProperties.java | 13 +- .../botservice/models/DirectLineSite.java | 26 +- .../models/DirectLineSpeechChannel.java | 14 +- .../DirectLineSpeechChannelProperties.java | 10 +- .../botservice/models/DirectLines.java | 6 +- .../botservice/models/EmailChannel.java | 14 +- .../models/EmailChannelAuthMethod.java | 24 +- .../models/EmailChannelProperties.java | 22 +- .../botservice/models/Emails.java | 39 + .../botservice/models/FacebookChannel.java | 14 +- .../models/FacebookChannelProperties.java | 21 +- .../botservice/models/FacebookPage.java | 17 +- .../botservice/models/HostSettings.java | 2 +- .../models/HostSettingsResponse.java | 4 +- .../botservice/models/Key.java | 2 +- .../botservice/models/KikChannel.java | 14 +- .../models/KikChannelProperties.java | 39 +- .../botservice/models/Kind.java | 2 +- .../botservice/models/LineChannel.java | 14 +- .../models/LineChannelProperties.java | 20 +- .../botservice/models/LineRegistration.java | 10 +- .../models/ListChannelWithKeysResponse.java | 28 +- .../botservice/models/M365Extensions.java | 11 +- .../botservice/models/MsTeamsChannel.java | 14 +- .../models/MsTeamsChannelProperties.java | 10 +- .../botservice/models/MsaAppType.java | 2 +- .../models/NetworkSecurityPerimeter.java | 109 ++ ...NetworkSecurityPerimeterConfiguration.java | 56 ++ ...urityPerimeterConfigurationProperties.java | 149 +++ ...etworkSecurityPerimeterConfigurations.java | 105 ++ .../botservice/models/NspAccessRule.java | 90 ++ .../models/NspAccessRuleDirection.java | 51 + .../models/NspAccessRuleProperties.java | 183 ++++ ...AccessRulePropertiesSubscriptionsItem.java | 76 ++ .../botservice/models/Omnichannel.java | 11 +- .../models/OperationDisplayInfo.java | 60 +- .../botservice/models/OperationEntity.java | 5 +- .../models/OperationResultStatus.java | 66 ++ .../botservice/models/OperationResults.java | 35 + .../models/OperationResultsDescription.java | 48 + .../botservice/models/Operations.java | 6 +- .../botservice/models/OutlookChannel.java | 11 +- .../botservice/models/PrivateEndpoint.java | 73 ++ .../models/PrivateEndpointConnection.java | 190 ++++ ...teEndpointConnectionProvisioningState.java | 62 ++ .../models/PrivateEndpointConnections.java | 153 +++ ...rivateEndpointServiceConnectionStatus.java | 57 ++ .../models/PrivateLinkResource.java | 157 +++ .../models/PrivateLinkResourceBase.java | 144 +++ .../models/PrivateLinkResourceListResult.java | 27 + .../models/PrivateLinkResources.java | 39 + .../PrivateLinkServiceConnectionState.java | 147 +++ .../botservice/models/Profile.java | 144 +++ .../botservice/models/ProvisioningIssue.java | 90 ++ .../models/ProvisioningIssueProperties.java | 147 +++ .../botservice/models/ProvisioningState.java | 71 ++ .../models/PublicNetworkAccess.java | 7 +- .../models/QnAMakerEndpointKeys.java | 36 + .../QnAMakerEndpointKeysRequestBody.java | 114 +++ .../models/QnAMakerEndpointKeysResponse.java | 47 + .../models/RegenerateKeysChannelName.java | 2 +- .../models/ResourceAssociation.java | 91 ++ .../botservice/models/SearchAssistant.java | 11 +- .../botservice/models/ServiceProvider.java | 30 +- .../models/ServiceProviderParameter.java | 15 +- .../ServiceProviderParameterMetadata.java | 30 +- ...eProviderParameterMetadataConstraints.java | 27 +- .../models/ServiceProviderProperties.java | 41 +- .../models/ServiceProviderResponseList.java | 2 +- .../botservice/models/Severity.java | 51 + .../botservice/models/Site.java | 39 +- .../botservice/models/SiteInfo.java | 20 +- .../botservice/models/Sku.java | 16 +- .../botservice/models/SkuName.java | 2 +- .../botservice/models/SkuTier.java | 2 +- .../botservice/models/SkypeChannel.java | 14 +- .../models/SkypeChannelProperties.java | 32 +- .../botservice/models/SlackChannel.java | 14 +- .../models/SlackChannelProperties.java | 23 +- .../botservice/models/SmsChannel.java | 14 +- .../models/SmsChannelProperties.java | 44 +- .../botservice/models/TelegramChannel.java | 14 +- .../models/TelegramChannelProperties.java | 10 +- .../botservice/models/TelephonyChannel.java | 14 +- .../models/TelephonyChannelProperties.java | 38 +- ...ephonyChannelResourceApiConfiguration.java | 10 +- .../models/TelephonyPhoneNumbers.java | 10 +- .../botservice/models/WebChatChannel.java | 14 +- .../models/WebChatChannelProperties.java | 13 +- .../botservice/models/WebChatSite.java | 26 +- .../botservice/models/package-info.java | 4 +- .../botservice/package-info.java | 4 +- .../src/main/java/module-info.java | 3 +- ...e-resourcemanager-botservice_metadata.json | 1 + .../proxy-config.json | 2 +- ...zure-resourcemanager-botservice.properties | 1 + .../generated/BotConnectionCreateSamples.java | 7 +- .../generated/BotConnectionDeleteSamples.java | 5 +- .../generated/BotConnectionGetSamples.java | 5 +- .../BotConnectionListByBotServiceSamples.java | 5 +- ...ConnectionListServiceProvidersSamples.java | 6 +- .../BotConnectionListWithSecretsSamples.java | 5 +- .../generated/BotConnectionUpdateSamples.java | 9 +- .../generated/BotsCreateSamples.java | 13 +- .../generated/BotsDeleteSamples.java | 5 +- .../BotsGetByResourceGroupSamples.java | 5 +- .../BotsGetCheckNameAvailabilitySamples.java | 6 +- .../BotsListByResourceGroupSamples.java | 6 +- .../botservice/generated/BotsListSamples.java | 6 +- .../generated/BotsUpdateSamples.java | 11 +- .../generated/ChannelsCreateSamples.java | 59 +- .../generated/ChannelsDeleteSamples.java | 8 +- .../generated/ChannelsGetSamples.java | 14 +- .../ChannelsListByResourceGroupSamples.java | 5 +- .../ChannelsListWithKeysSamples.java | 5 +- .../generated/ChannelsUpdateSamples.java | 44 +- .../DirectLineRegenerateKeysSamples.java | 9 +- .../EmailCreateSignInUrlSamples.java | 23 + .../generated/HostSettingsGetSamples.java | 5 +- ...rityPerimeterConfigurationsGetSamples.java | 25 + ...ityPerimeterConfigurationsListSamples.java | 23 + ...rimeterConfigurationsReconcileSamples.java | 25 + .../generated/OperationResultsGetSamples.java | 22 + .../generated/OperationsListSamples.java | 5 +- ...ivateEndpointConnectionsCreateSamples.java | 31 + ...ivateEndpointConnectionsDeleteSamples.java | 24 + .../PrivateEndpointConnectionsGetSamples.java | 23 + ...PrivateEndpointConnectionsListSamples.java | 22 + ...LinkResourcesListByBotResourceSamples.java | 23 + .../QnAMakerEndpointKeysGetSamples.java | 28 + .../generated/AcsChatChannelTests.java | 14 +- .../AlexaChannelPropertiesTests.java | 15 +- .../generated/AlexaChannelTests.java | 26 +- .../generated/BotChannelInnerTests.java | 42 +- ...onnectionsDeleteWithResponseMockTests.java | 9 +- ...ServiceProvidersWithResponseMockTests.java | 10 +- ...eByResourceGroupWithResponseMockTests.java | 8 +- .../generated/ChannelResponseListTests.java | 15 +- .../botservice/generated/ChannelTests.java | 14 +- .../ChannelsCreateWithResponseMockTests.java | 30 +- .../ChannelsDeleteWithResponseMockTests.java | 8 +- .../ChannelsGetWithResponseMockTests.java | 24 +- .../ChannelsListByResourceGroupMockTests.java | 24 +- .../ChannelsUpdateWithResponseMockTests.java | 33 +- ...CheckNameAvailabilityRequestBodyTests.java | 17 +- ...reateEmailSignInUrlResponseInnerTests.java | 20 + ...EmailSignInUrlResponsePropertiesTests.java | 18 + ...sCreateSignInUrlWithResponseMockTests.java | 39 + .../generated/M365ExtensionsTests.java | 14 +- .../MsTeamsChannelPropertiesTests.java | 34 +- .../generated/MsTeamsChannelTests.java | 52 +- ...urityPerimeterConfigurationInnerTests.java | 21 + ...curityPerimeterConfigurationListTests.java | 19 + ...PerimeterConfigurationPropertiesTests.java | 21 + ...onfigurationsGetWithResponseMockTests.java | 41 + ...yPerimeterConfigurationsListMockTests.java | 43 + ...meterConfigurationsReconcileMockTests.java | 40 + .../NetworkSecurityPerimeterTests.java | 20 + ...sRulePropertiesSubscriptionsItemTests.java | 18 + .../NspAccessRulePropertiesTests.java | 22 + .../generated/NspAccessRuleTests.java | 19 + .../generated/OmnichannelTests.java | 14 +- .../generated/OperationDisplayInfoTests.java | 25 +- .../generated/OperationEntityInnerTests.java | 35 +- .../OperationEntityListResultTests.java | 43 +- ...OperationResultsDescriptionInnerTests.java | 17 + .../generated/OperationsListMockTests.java | 20 +- .../generated/OutlookChannelTests.java | 14 +- .../PrivateEndpointConnectionInnerTests.java | 44 + ...vateEndpointConnectionListResultTests.java | 26 + ...vateEndpointConnectionPropertiesTests.java | 44 + ...onnectionsCreateWithResponseMockTests.java | 54 + ...onnectionsDeleteWithResponseMockTests.java | 34 + ...ntConnectionsGetWithResponseMockTests.java | 44 + ...ivateEndpointConnectionsListMockTests.java | 46 + .../generated/PrivateEndpointTests.java | 21 + .../PrivateLinkResourceBaseTests.java | 16 + ...ivateLinkResourceListResultInnerTests.java | 19 + .../PrivateLinkResourcePropertiesTests.java | 19 + .../generated/PrivateLinkResourceTests.java | 19 + ...istByBotResourceWithResponseMockTests.java | 39 + ...rivateLinkServiceConnectionStateTests.java | 34 + .../botservice/generated/ProfileTests.java | 22 + .../ProvisioningIssuePropertiesTests.java | 23 + .../generated/ProvisioningIssueTests.java | 19 + .../generated/ResourceAssociationTests.java | 20 + .../generated/SearchAssistantTests.java | 14 +- ...iderParameterMetadataConstraintsTests.java | 14 +- ...ServiceProviderParameterMetadataTests.java | 15 +- .../ServiceProviderParameterTests.java | 10 +- .../ServiceProviderPropertiesTests.java | 17 +- ...ServiceProviderResponseListInnerTests.java | 13 +- .../generated/ServiceProviderTests.java | 18 +- .../botservice/generated/SkuTests.java | 4 +- .../SkypeChannelPropertiesTests.java | 54 +- .../generated/SkypeChannelTests.java | 68 +- .../tsp-location.yaml | 4 + 302 files changed, 12585 insertions(+), 4859 deletions(-) rename sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/{AzureBotService.java => BotServiceManagementClient.java} (53%) create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/EmailsClient.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/NetworkSecurityPerimeterConfigurationsClient.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/OperationResultsClient.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/PrivateEndpointConnectionsClient.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/PrivateLinkResourcesClient.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/QnAMakerEndpointKeysClient.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/CreateEmailSignInUrlResponseInner.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/NetworkSecurityPerimeterConfigurationInner.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/OperationResultsDescriptionInner.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/PrivateEndpointConnectionInner.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/PrivateEndpointConnectionProperties.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/PrivateLinkResourceListResultInner.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/PrivateLinkResourceProperties.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/QnAMakerEndpointKeysResponseInner.java rename sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/{AzureBotServiceBuilder.java => BotServiceManagementClientBuilder.java} (63%) rename sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/{AzureBotServiceImpl.java => BotServiceManagementClientImpl.java} (66%) create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/CreateEmailSignInUrlResponseImpl.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/EmailsClientImpl.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/EmailsImpl.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/NetworkSecurityPerimeterConfigurationImpl.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/NetworkSecurityPerimeterConfigurationsImpl.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/OperationResultsClientImpl.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/OperationResultsDescriptionImpl.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/OperationResultsImpl.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateEndpointConnectionImpl.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateEndpointConnectionsClientImpl.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateEndpointConnectionsImpl.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateLinkResourceListResultImpl.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateLinkResourcesClientImpl.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateLinkResourcesImpl.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/QnAMakerEndpointKeysClientImpl.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/QnAMakerEndpointKeysImpl.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/QnAMakerEndpointKeysResponseImpl.java rename sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/{ => implementation}/models/BotResponseList.java (65%) rename sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/{ => implementation}/models/ChannelResponseList.java (65%) rename sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/{ => implementation}/models/ConnectionSettingResponseList.java (66%) create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/models/NetworkSecurityPerimeterConfigurationList.java rename sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/{ => implementation}/models/OperationEntityListResult.java (70%) create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/models/PrivateEndpointConnectionListResult.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/AccessMode.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/CreateEmailSignInUrlResponse.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/CreateEmailSignInUrlResponseProperties.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Emails.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/NetworkSecurityPerimeter.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/NetworkSecurityPerimeterConfiguration.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/NetworkSecurityPerimeterConfigurationProperties.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/NetworkSecurityPerimeterConfigurations.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/NspAccessRule.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/NspAccessRuleDirection.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/NspAccessRuleProperties.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/NspAccessRulePropertiesSubscriptionsItem.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/OperationResultStatus.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/OperationResults.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/OperationResultsDescription.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpoint.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointConnection.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointConnectionProvisioningState.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointConnections.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointServiceConnectionStatus.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkResource.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkResourceBase.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkResourceListResult.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkResources.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkServiceConnectionState.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Profile.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ProvisioningIssue.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ProvisioningIssueProperties.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ProvisioningState.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/QnAMakerEndpointKeys.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/QnAMakerEndpointKeysRequestBody.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/QnAMakerEndpointKeysResponse.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ResourceAssociation.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Severity.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/resources/META-INF/azure-resourcemanager-botservice_metadata.json create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/main/resources/azure-resourcemanager-botservice.properties create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/EmailCreateSignInUrlSamples.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationsGetSamples.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationsListSamples.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationsReconcileSamples.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/OperationResultsGetSamples.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsCreateSamples.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsDeleteSamples.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsGetSamples.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsListSamples.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateLinkResourcesListByBotResourceSamples.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/QnAMakerEndpointKeysGetSamples.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/CreateEmailSignInUrlResponseInnerTests.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/CreateEmailSignInUrlResponsePropertiesTests.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/EmailsCreateSignInUrlWithResponseMockTests.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationInnerTests.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationListTests.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationPropertiesTests.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationsGetWithResponseMockTests.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationsListMockTests.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationsReconcileMockTests.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterTests.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NspAccessRulePropertiesSubscriptionsItemTests.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NspAccessRulePropertiesTests.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NspAccessRuleTests.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/OperationResultsDescriptionInnerTests.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionInnerTests.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionListResultTests.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionPropertiesTests.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsCreateWithResponseMockTests.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsDeleteWithResponseMockTests.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsListMockTests.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointTests.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateLinkResourceBaseTests.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateLinkResourceListResultInnerTests.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateLinkResourcePropertiesTests.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateLinkResourceTests.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateLinkResourcesListByBotResourceWithResponseMockTests.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateLinkServiceConnectionStateTests.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ProfileTests.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ProvisioningIssuePropertiesTests.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ProvisioningIssueTests.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ResourceAssociationTests.java create mode 100644 sdk/botservice/azure-resourcemanager-botservice/tsp-location.yaml diff --git a/sdk/botservice/azure-resourcemanager-botservice/CHANGELOG.md b/sdk/botservice/azure-resourcemanager-botservice/CHANGELOG.md index 94b4c991d032..9e03a2e619ad 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/CHANGELOG.md +++ b/sdk/botservice/azure-resourcemanager-botservice/CHANGELOG.md @@ -1,14 +1,442 @@ # Release History -## 1.1.0-beta.1 (Unreleased) +## 1.1.0-beta.1 (2026-03-04) -### Features Added +- Azure Resource Manager BotService client library for Java. This package contains Microsoft Azure SDK for BotService Management SDK. Azure Bot Service is a platform for creating smart conversational agents. Package api-version 2023-09-15-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Breaking Changes -### Bugs Fixed +#### `models.BotResponseList` was removed -### Other Changes +#### `models.ChannelResponseList` was removed + +#### `models.OperationEntityListResult` was removed + +#### `models.ConnectionSettingResponseList` was removed + +#### `models.TelephonyChannelProperties` was modified + +* `withPremiumSku(java.lang.String)` was removed +* `premiumSku()` was removed +* `validate()` was removed + +#### `models.ServiceProviderProperties` was modified + +* `ServiceProviderProperties()` was changed to private access +* `validate()` was removed +* `withParameters(java.util.List)` was removed +* `withIconUrl(java.lang.String)` was removed + +#### `models.AlexaChannelProperties` was modified + +* `validate()` was removed + +#### `models.SmsChannelProperties` was modified + +* `accountSid()` was removed +* `withAccountSid(java.lang.String)` was removed +* `validate()` was removed + +#### `models.Channel` was modified + +* `validate()` was removed + +#### `models.ChannelSettings` was modified + +* `ChannelSettings()` was changed to private access +* `withExtensionKey1(java.lang.String)` was removed +* `withChannelDisplayName(java.lang.String)` was removed +* `withChannelId(java.lang.String)` was removed +* `withBotId(java.lang.String)` was removed +* `withRequireTermsAgreement(java.lang.Boolean)` was removed +* `withBotIconUrl(java.lang.String)` was removed +* `validate()` was removed +* `withDisableLocalAuth(java.lang.Boolean)` was removed +* `withIsEnabled(java.lang.Boolean)` was removed +* `withSites(java.util.List)` was removed +* `withExtensionKey2(java.lang.String)` was removed + +#### `models.DirectLineChannel` was modified + +* `validate()` was removed + +#### `models.KikChannel` was modified + +* `validate()` was removed + +#### `models.DirectLineChannelProperties` was modified + +* `validate()` was removed + +#### `models.OperationEntity` was modified + +* `java.lang.Object properties()` -> `com.azure.core.util.BinaryData properties()` + +#### `models.Sku` was modified + +* `validate()` was removed + +#### `models.OutlookChannel` was modified + +* `validate()` was removed + +#### `models.DirectLineSpeechChannel` was modified + +* `validate()` was removed + +#### `models.WebChatChannel` was modified + +* `validate()` was removed + +#### `models.TelephonyChannel` was modified + +* `validate()` was removed + +#### `models.BotProperties` was modified + +* `validate()` was removed +* `withMsaAppMsiResourceId(java.lang.String)` was removed +* `msaAppMsiResourceId()` was removed + +#### `models.SiteInfo` was modified + +* `validate()` was removed + +#### `models.FacebookChannelProperties` was modified + +* `validate()` was removed + +#### `models.TelegramChannelProperties` was modified + +* `validate()` was removed + +#### `models.TelegramChannel` was modified + +* `validate()` was removed + +#### `models.SlackChannel` was modified + +* `validate()` was removed + +#### `models.Site` was modified + +* `validate()` was removed +* `withEtag(java.lang.String)` was removed +* `etag()` was removed + +#### `models.FacebookChannel` was modified + +* `validate()` was removed + +#### `models.ServiceProviderParameterMetadata` was modified + +* `ServiceProviderParameterMetadata()` was changed to private access +* `validate()` was removed +* `withConstraints(models.ServiceProviderParameterMetadataConstraints)` was removed + +#### `models.MsTeamsChannel` was modified + +* `validate()` was removed + +#### `models.EmailChannelProperties` was modified + +* `validate()` was removed + +#### `models.ConnectionSettingProperties` was modified + +* `validate()` was removed + +#### `models.SkypeChannelProperties` was modified + +* `withCallingWebhook(java.lang.String)` was removed +* `callingWebhook()` was removed +* `validate()` was removed + +#### `models.WebChatChannelProperties` was modified + +* `validate()` was removed + +#### `models.ServiceProviderParameterMetadataConstraints` was modified + +* `ServiceProviderParameterMetadataConstraints()` was changed to private access +* `validate()` was removed +* `withRequired(java.lang.Boolean)` was removed + +#### `models.TelephonyChannelResourceApiConfiguration` was modified + +* `validate()` was removed + +#### `models.SearchAssistant` was modified + +* `validate()` was removed + +#### `models.DirectLineSpeechChannelProperties` was modified + +* `validate()` was removed + +#### `models.ServiceProvider` was modified + +* `ServiceProvider()` was changed to private access +* `withProperties(models.ServiceProviderProperties)` was removed +* `validate()` was removed + +#### `models.ConnectionSettingParameter` was modified + +* `validate()` was removed + +#### `models.KikChannelProperties` was modified + +* `validate()` was removed +* `withUsername(java.lang.String)` was removed +* `username()` was removed + +#### `models.DirectLineSite` was modified + +* `withEtag(java.lang.String)` was removed +* `validate()` was removed + +#### `models.LineRegistration` was modified + +* `validate()` was removed + +#### `models.EmailChannel` was modified + +* `validate()` was removed + +#### `models.Omnichannel` was modified + +* `validate()` was removed + +#### `models.AcsChatChannel` was modified + +* `validate()` was removed + +#### `models.OperationDisplayInfo` was modified + +* `OperationDisplayInfo()` was changed to private access +* `withDescription(java.lang.String)` was removed +* `withResource(java.lang.String)` was removed +* `withProvider(java.lang.String)` was removed +* `validate()` was removed +* `withOperation(java.lang.String)` was removed + +#### `models.SkypeChannel` was modified + +* `validate()` was removed + +#### `models.MsTeamsChannelProperties` was modified + +* `validate()` was removed + +#### `models.LineChannel` was modified + +* `validate()` was removed + +#### `models.SlackChannelProperties` was modified + +* `validate()` was removed + +#### `models.ServiceProviderParameter` was modified + +* `ServiceProviderParameter()` was changed to private access +* `validate()` was removed + +#### `models.AlexaChannel` was modified + +* `validate()` was removed + +#### `models.SmsChannel` was modified + +* `validate()` was removed + +#### `models.WebChatSite` was modified + +* `validate()` was removed +* `withEtag(java.lang.String)` was removed + +#### `models.TelephonyPhoneNumbers` was modified + +* `validate()` was removed + +#### `models.M365Extensions` was modified + +* `validate()` was removed + +#### `models.FacebookPage` was modified + +* `validate()` was removed + +#### `models.EmailChannelAuthMethod` was modified + +* `fromFloat(float)` was removed +* `toFloat()` was removed + +#### `models.LineChannelProperties` was modified + +* `validate()` was removed + +#### `models.CheckNameAvailabilityRequestBody` was modified + +* `validate()` was removed + +#### `BotServiceManager` was modified + +* `fluent.AzureBotService serviceClient()` -> `fluent.BotServiceManagementClient serviceClient()` + +### Features Added + +* `models.OperationResultsDescription` was added + +* `models.ProvisioningState` was added + +* `models.NspAccessRuleDirection` was added + +* `models.QnAMakerEndpointKeysResponse` was added + +* `models.AccessMode` was added + +* `models.PrivateLinkResources` was added + +* `models.CreateEmailSignInUrlResponse` was added + +* `models.PrivateEndpointConnection$DefinitionStages` was added + +* `models.ResourceAssociation` was added + +* `models.PrivateEndpointConnections` was added + +* `models.OperationResultStatus` was added + +* `models.ProvisioningIssue` was added + +* `models.QnAMakerEndpointKeysRequestBody` was added + +* `models.ProvisioningIssueProperties` was added + +* `models.Severity` was added + +* `models.PrivateLinkServiceConnectionState` was added + +* `models.PrivateEndpointConnectionProvisioningState` was added + +* `models.PrivateLinkResource` was added + +* `models.CreateEmailSignInUrlResponseProperties` was added + +* `models.PrivateEndpoint` was added + +* `models.PrivateEndpointConnection` was added + +* `models.PrivateEndpointServiceConnectionStatus` was added + +* `models.PrivateLinkResourceBase` was added + +* `models.Emails` was added + +* `models.PrivateEndpointConnection$Definition` was added + +* `models.NetworkSecurityPerimeter` was added + +* `models.NspAccessRulePropertiesSubscriptionsItem` was added + +* `models.NspAccessRuleProperties` was added + +* `models.NetworkSecurityPerimeterConfigurationProperties` was added + +* `models.Profile` was added + +* `models.QnAMakerEndpointKeys` was added + +* `models.OperationResults` was added + +* `models.NetworkSecurityPerimeterConfigurations` was added + +* `models.NspAccessRule` was added + +* `models.NetworkSecurityPerimeterConfiguration` was added + +* `models.PrivateLinkResourceListResult` was added + +#### `models.BotChannel` was modified + +* `systemData()` was added + +#### `models.TelephonyChannelProperties` was modified + +* `withPremiumSKU(java.lang.String)` was added +* `premiumSKU()` was added + +#### `models.Bot` was modified + +* `systemData()` was added + +#### `models.SmsChannelProperties` was modified + +* `withAccountSID(java.lang.String)` was added +* `accountSID()` was added + +#### `models.ListChannelWithKeysResponse` was modified + +* `systemData()` was added + +#### `models.BotProperties` was modified + +* `networkSecurityPerimeterConfigurations()` was added +* `withMsaAppMSIResourceId(java.lang.String)` was added +* `msaAppMSIResourceId()` was added +* `privateEndpointConnections()` was added + +#### `models.Site` was modified + +* `withETag(java.lang.String)` was added +* `eTag()` was added + +#### `models.ConnectionSettingProperties` was modified + +* `withId(java.lang.String)` was added +* `name()` was added +* `withName(java.lang.String)` was added +* `id()` was added + +#### `models.SkypeChannelProperties` was modified + +* `callingWebHook()` was added +* `withCallingWebHook(java.lang.String)` was added + +#### `models.KikChannelProperties` was modified + +* `withUserName(java.lang.String)` was added +* `userName()` was added + +#### `models.DirectLineSite` was modified + +* `withETag(java.lang.String)` was added + +#### `models.SlackChannelProperties` was modified + +* `withRegisterBeforeOAuthFlow(java.lang.Boolean)` was added + +#### `models.ConnectionSetting` was modified + +* `systemData()` was added + +#### `models.WebChatSite` was modified + +* `withETag(java.lang.String)` was added + +#### `models.EmailChannelAuthMethod` was modified + +* `fromInt(int)` was added +* `toInt()` was added + +#### `BotServiceManager` was modified + +* `qnAMakerEndpointKeys()` was added +* `privateEndpointConnections()` was added +* `operationResults()` was added +* `privateLinkResources()` was added +* `emails()` was added +* `networkSecurityPerimeterConfigurations()` was added ## 1.0.0 (2025-01-02) diff --git a/sdk/botservice/azure-resourcemanager-botservice/README.md b/sdk/botservice/azure-resourcemanager-botservice/README.md index ca0974fcdc78..fb3783d82e95 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/README.md +++ b/sdk/botservice/azure-resourcemanager-botservice/README.md @@ -2,7 +2,7 @@ Azure Resource Manager BotService client library for Java. -This package contains Microsoft Azure SDK for BotService Management SDK. Azure Bot Service is a platform for creating smart conversational agents. Package tag package-2021-03-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for BotService Management SDK. Azure Bot Service is a platform for creating smart conversational agents. Package api-version 2023-09-15-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -52,7 +52,7 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code: ```java -AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); +AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD); TokenCredential credential = new DefaultAzureCredentialBuilder() .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint()) .build(); @@ -60,7 +60,7 @@ BotServiceManager manager = BotServiceManager .authenticate(credential, profile); ``` -The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise. +The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise. See [Authentication][authenticate] for more options. @@ -100,5 +100,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md [coc]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ - - diff --git a/sdk/botservice/azure-resourcemanager-botservice/SAMPLE.md b/sdk/botservice/azure-resourcemanager-botservice/SAMPLE.md index 5235661d4208..e836d11507a3 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/SAMPLE.md +++ b/sdk/botservice/azure-resourcemanager-botservice/SAMPLE.md @@ -34,13 +34,42 @@ - [RegenerateKeys](#directline_regeneratekeys) +## Email + +- [CreateSignInUrl](#email_createsigninurl) + ## HostSettings - [Get](#hostsettings_get) +## NetworkSecurityPerimeterConfigurations + +- [Get](#networksecurityperimeterconfigurations_get) +- [List](#networksecurityperimeterconfigurations_list) +- [Reconcile](#networksecurityperimeterconfigurations_reconcile) + +## OperationResults + +- [Get](#operationresults_get) + ## Operations - [List](#operations_list) + +## PrivateEndpointConnections + +- [Create](#privateendpointconnections_create) +- [Delete](#privateendpointconnections_delete) +- [Get](#privateendpointconnections_get) +- [List](#privateendpointconnections_list) + +## PrivateLinkResources + +- [ListByBotResource](#privatelinkresources_listbybotresource) + +## QnAMakerEndpointKeys + +- [Get](#qnamakerendpointkeys_get) ### BotConnection_Create ```java @@ -53,8 +82,7 @@ import java.util.Arrays; */ public final class BotConnectionCreateSamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/PutConnection.json + * x-ms-original-file: 2023-09-15-preview/PutConnection.json */ /** * Sample code: Create Connection Setting. @@ -64,8 +92,8 @@ public final class BotConnectionCreateSamples { public static void createConnectionSetting(com.azure.resourcemanager.botservice.BotServiceManager manager) { manager.botConnections() .define("sampleConnection") - .withRegion("West US") .withExistingBotService("OneResourceGroupName", "samplebotname") + .withRegion("West US") .withProperties( new ConnectionSettingProperties().withClientId("sampleclientid") .withClientSecret("fakeTokenPlaceholder") @@ -88,8 +116,7 @@ public final class BotConnectionCreateSamples { */ public final class BotConnectionDeleteSamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/DeleteConnection.json + * x-ms-original-file: 2023-09-15-preview/DeleteConnection.json */ /** * Sample code: Delete Connection Setting. @@ -112,8 +139,7 @@ public final class BotConnectionDeleteSamples { */ public final class BotConnectionGetSamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/GetConnection.json + * x-ms-original-file: 2023-09-15-preview/GetConnection.json */ /** * Sample code: Get Connection Setting. @@ -136,8 +162,7 @@ public final class BotConnectionGetSamples { */ public final class BotConnectionListByBotServiceSamples { /* - * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/ - * ListConnectionsByBotService.json + * x-ms-original-file: 2023-09-15-preview/ListConnectionsByBotService.json */ /** * Sample code: List Connection Settings. @@ -159,9 +184,7 @@ public final class BotConnectionListByBotServiceSamples { */ public final class BotConnectionListServiceProvidersSamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/ListServiceProviders. - * json + * x-ms-original-file: 2023-09-15-preview/ListServiceProviders.json */ /** * Sample code: List Auth Service Providers. @@ -182,8 +205,7 @@ public final class BotConnectionListServiceProvidersSamples { */ public final class BotConnectionListWithSecretsSamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/GetConnection.json + * x-ms-original-file: 2023-09-15-preview/GetConnectionListWithSecrets.json */ /** * Sample code: List Connection Setting With Secrets. @@ -212,8 +234,7 @@ import java.util.Arrays; */ public final class BotConnectionUpdateSamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/UpdateConnection.json + * x-ms-original-file: 2023-09-15-preview/UpdateConnection.json */ /** * Sample code: Update Connection Setting. @@ -227,7 +248,9 @@ public final class BotConnectionUpdateSamples { .getValue(); resource.update() .withProperties( - new ConnectionSettingProperties().withClientId("sampleclientid") + new ConnectionSettingProperties().withId("sampleId") + .withName("sampleName") + .withClientId("sampleclientid") .withClientSecret("fakeTokenPlaceholder") .withScopes("samplescope") .withServiceProviderId("serviceproviderid") @@ -246,6 +269,7 @@ public final class BotConnectionUpdateSamples { ```java import com.azure.resourcemanager.botservice.models.BotProperties; import com.azure.resourcemanager.botservice.models.Kind; +import com.azure.resourcemanager.botservice.models.MsaAppType; import com.azure.resourcemanager.botservice.models.PublicNetworkAccess; import com.azure.resourcemanager.botservice.models.Sku; import com.azure.resourcemanager.botservice.models.SkuName; @@ -258,8 +282,7 @@ import java.util.Map; */ public final class BotsCreateSamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/CreateBot.json + * x-ms-original-file: 2023-09-15-preview/CreateBot.json */ /** * Sample code: Create Bot. @@ -269,14 +292,18 @@ public final class BotsCreateSamples { public static void createBot(com.azure.resourcemanager.botservice.BotServiceManager manager) { manager.bots() .define("samplebotname") - .withRegion("West US") .withExistingResourceGroup("OneResourceGroupName") + .withRegion("West US") .withTags(mapOf("tag1", "value1", "tag2", "value2")) .withProperties(new BotProperties().withDisplayName("The Name of the bot") .withDescription("The description of the bot") .withIconUrl("http://myicon") .withEndpoint("http://mybot.coffee") + .withMsaAppType(MsaAppType.USER_ASSIGNED_MSI) .withMsaAppId("exampleappid") + .withMsaAppTenantId("exampleapptenantid") + .withMsaAppMSIResourceId( + "/subscriptions/foo/resourcegroups/bar/providers/microsoft.managedidentity/userassignedidentities/sampleId") .withDeveloperAppInsightKey("fakeTokenPlaceholder") .withDeveloperAppInsightsApiKey("fakeTokenPlaceholder") .withDeveloperAppInsightsApplicationId("appinsightsappid") @@ -285,6 +312,7 @@ public final class BotsCreateSamples { .withIsCmekEnabled(true) .withCmekKeyVaultUrl("fakeTokenPlaceholder") .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) + .withDisableLocalAuth(true) .withSchemaTransformationVersion("1.0")) .withSku(new Sku().withName(SkuName.S1)) .withKind(Kind.SDK) @@ -314,8 +342,7 @@ public final class BotsCreateSamples { */ public final class BotsDeleteSamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/DeleteBot.json + * x-ms-original-file: 2023-09-15-preview/DeleteBot.json */ /** * Sample code: Delete Bot. @@ -338,8 +365,7 @@ public final class BotsDeleteSamples { */ public final class BotsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/GetBot.json + * x-ms-original-file: 2023-09-15-preview/GetBot.json */ /** * Sample code: Get Bot. @@ -363,9 +389,7 @@ import com.azure.resourcemanager.botservice.models.CheckNameAvailabilityRequestB */ public final class BotsGetCheckNameAvailabilitySamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/CheckNameAvailability. - * json + * x-ms-original-file: 2023-09-15-preview/CheckNameAvailability.json */ /** * Sample code: check Name Availability. @@ -389,9 +413,7 @@ public final class BotsGetCheckNameAvailabilitySamples { */ public final class BotsListSamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/ListBotsBySubscription. - * json + * x-ms-original-file: 2023-09-15-preview/ListBotsBySubscription.json */ /** * Sample code: List Bots by Subscription. @@ -412,9 +434,7 @@ public final class BotsListSamples { */ public final class BotsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/ListBotsByResourceGroup - * .json + * x-ms-original-file: 2023-09-15-preview/ListBotsByResourceGroup.json */ /** * Sample code: List Bots by Resource Group. @@ -433,6 +453,7 @@ public final class BotsListByResourceGroupSamples { import com.azure.resourcemanager.botservice.models.Bot; import com.azure.resourcemanager.botservice.models.BotProperties; import com.azure.resourcemanager.botservice.models.Kind; +import com.azure.resourcemanager.botservice.models.MsaAppType; import com.azure.resourcemanager.botservice.models.PublicNetworkAccess; import com.azure.resourcemanager.botservice.models.Sku; import com.azure.resourcemanager.botservice.models.SkuName; @@ -445,8 +466,7 @@ import java.util.Map; */ public final class BotsUpdateSamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/UpdateBot.json + * x-ms-original-file: 2023-09-15-preview/UpdateBot.json */ /** * Sample code: Update Bot. @@ -463,7 +483,11 @@ public final class BotsUpdateSamples { .withDescription("The description of the bot") .withIconUrl("http://myicon") .withEndpoint("http://mybot.coffee") + .withMsaAppType(MsaAppType.USER_ASSIGNED_MSI) .withMsaAppId("msaappid") + .withMsaAppTenantId("msaapptenantid") + .withMsaAppMSIResourceId( + "/subscriptions/foo/resourcegroups/bar/providers/microsoft.managedidentity/userassignedidentities/sampleId") .withDeveloperAppInsightKey("fakeTokenPlaceholder") .withDeveloperAppInsightsApiKey("fakeTokenPlaceholder") .withDeveloperAppInsightsApplicationId("appinsightsappid") @@ -472,6 +496,7 @@ public final class BotsUpdateSamples { .withIsCmekEnabled(true) .withCmekKeyVaultUrl("fakeTokenPlaceholder") .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) + .withDisableLocalAuth(true) .withSchemaTransformationVersion("1.0")) .withSku(new Sku().withName(SkuName.S1)) .withKind(Kind.SDK) @@ -515,8 +540,7 @@ import java.util.Arrays; */ public final class ChannelsCreateSamples { /* - * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/ - * PutDirectLineSpeechChannel.json + * x-ms-original-file: 2023-09-15-preview/PutDirectLineSpeechChannel.json */ /** * Sample code: Create DirectLine Speech Channel. @@ -526,17 +550,16 @@ public final class ChannelsCreateSamples { public static void createDirectLineSpeechChannel(com.azure.resourcemanager.botservice.BotServiceManager manager) { manager.channels() .createWithResponse("OneResourceGroupName", "samplebotname", ChannelName.DIRECT_LINE_SPEECH_CHANNEL, - new BotChannelInner().withLocation("global") - .withProperties(new DirectLineSpeechChannel().withProperties( - new DirectLineSpeechChannelProperties().withCognitiveServiceRegion("XcognitiveServiceRegionX") - .withCognitiveServiceSubscriptionKey("fakeTokenPlaceholder") - .withIsEnabled(true))), + new BotChannelInner().withProperties(new DirectLineSpeechChannel().withProperties( + new DirectLineSpeechChannelProperties().withCognitiveServiceRegion("XcognitiveServiceRegionX") + .withCognitiveServiceSubscriptionKey("fakeTokenPlaceholder") + .withIsEnabled(true))) + .withLocation("global"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/PutEmailChannel.json + * x-ms-original-file: 2023-09-15-preview/PutEmailChannel.json */ /** * Sample code: Create Email Channel. @@ -546,18 +569,17 @@ public final class ChannelsCreateSamples { public static void createEmailChannel(com.azure.resourcemanager.botservice.BotServiceManager manager) { manager.channels() .createWithResponse("OneResourceGroupName", "samplebotname", ChannelName.EMAIL_CHANNEL, - new BotChannelInner().withLocation("global") - .withProperties( - new EmailChannel().withProperties(new EmailChannelProperties().withEmailAddress("a@b.com") - .withAuthMethod(EmailChannelAuthMethod.ONE) - .withMagicCode("fakeTokenPlaceholder") - .withIsEnabled(true))), + new BotChannelInner().withProperties( + new EmailChannel().withProperties(new EmailChannelProperties().withEmailAddress("a@b.com") + .withAuthMethod(EmailChannelAuthMethod.GRAPH) + .withMagicCode("fakeTokenPlaceholder") + .withIsEnabled(true))) + .withLocation("global"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/PutAlexaChannel.json + * x-ms-original-file: 2023-09-15-preview/PutAlexaChannel.json */ /** * Sample code: Create Alexa Channel. @@ -567,15 +589,15 @@ public final class ChannelsCreateSamples { public static void createAlexaChannel(com.azure.resourcemanager.botservice.BotServiceManager manager) { manager.channels() .createWithResponse("OneResourceGroupName", "samplebotname", ChannelName.ALEXA_CHANNEL, - new BotChannelInner().withLocation("global") + new BotChannelInner() .withProperties(new AlexaChannel().withProperties( - new AlexaChannelProperties().withAlexaSkillId("XAlexaSkillIdX").withIsEnabled(true))), + new AlexaChannelProperties().withAlexaSkillId("XAlexaSkillIdX").withIsEnabled(true))) + .withLocation("global"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/PutChannel.json + * x-ms-original-file: 2023-09-15-preview/PutChannel.json */ /** * Sample code: Create Channel. @@ -585,17 +607,16 @@ public final class ChannelsCreateSamples { public static void createChannel(com.azure.resourcemanager.botservice.BotServiceManager manager) { manager.channels() .createWithResponse("OneResourceGroupName", "samplebotname", ChannelName.EMAIL_CHANNEL, - new BotChannelInner().withLocation("global") - .withProperties( - new EmailChannel().withProperties(new EmailChannelProperties().withEmailAddress("a@b.com") - .withPassword("fakeTokenPlaceholder") - .withIsEnabled(true))), + new BotChannelInner().withProperties( + new EmailChannel().withProperties(new EmailChannelProperties().withEmailAddress("a@b.com") + .withPassword("fakeTokenPlaceholder") + .withIsEnabled(true))) + .withLocation("global"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/PutLineChannel.json + * x-ms-original-file: 2023-09-15-preview/PutLineChannel.json */ /** * Sample code: Create Line Channel. @@ -605,10 +626,11 @@ public final class ChannelsCreateSamples { public static void createLineChannel(com.azure.resourcemanager.botservice.BotServiceManager manager) { manager.channels() .createWithResponse("OneResourceGroupName", "samplebotname", ChannelName.LINE_CHANNEL, - new BotChannelInner().withLocation("global") + new BotChannelInner() .withProperties(new LineChannel().withProperties(new LineChannelProperties().withLineRegistrations( Arrays.asList(new LineRegistration().withChannelSecret("fakeTokenPlaceholder") - .withChannelAccessToken("fakeTokenPlaceholder"))))), + .withChannelAccessToken("fakeTokenPlaceholder"))))) + .withLocation("global"), com.azure.core.util.Context.NONE); } } @@ -622,8 +644,7 @@ public final class ChannelsCreateSamples { */ public final class ChannelsDeleteSamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/DeleteChannel.json + * x-ms-original-file: 2023-09-15-preview/DeleteChannel.json */ /** * Sample code: Delete Channel. @@ -637,8 +658,7 @@ public final class ChannelsDeleteSamples { } /* - * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/ - * DeleteDirectLineSpeechChannel.json + * x-ms-original-file: 2023-09-15-preview/DeleteDirectLineSpeechChannel.json */ /** * Sample code: Delete DirectLine Speech Channel. @@ -661,8 +681,7 @@ public final class ChannelsDeleteSamples { */ public final class ChannelsGetSamples { /* - * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/ - * GetDirectLineSpeechChannel.json + * x-ms-original-file: 2023-09-15-preview/GetDirectLineSpeechChannel.json */ /** * Sample code: Get DirectLine Speech Channel. @@ -676,8 +695,7 @@ public final class ChannelsGetSamples { } /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/GetAlexaChannel.json + * x-ms-original-file: 2023-09-15-preview/GetAlexaChannel.json */ /** * Sample code: Get Alexa Channel. @@ -690,8 +708,7 @@ public final class ChannelsGetSamples { } /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/GetLineChannel.json + * x-ms-original-file: 2023-09-15-preview/GetLineChannel.json */ /** * Sample code: Get Line Channel. @@ -704,8 +721,7 @@ public final class ChannelsGetSamples { } /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/GetChannel.json + * x-ms-original-file: 2023-09-15-preview/GetChannel.json */ /** * Sample code: Get Channel. @@ -727,8 +743,7 @@ public final class ChannelsGetSamples { */ public final class ChannelsListByResourceGroupSamples { /* - * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/ - * ListChannelsByBotService.json + * x-ms-original-file: 2023-09-15-preview/ListChannelsByBotService.json */ /** * Sample code: List Channels by Resource Group. @@ -752,8 +767,7 @@ import com.azure.resourcemanager.botservice.models.ChannelName; */ public final class ChannelsListWithKeysSamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/ListChannel.json + * x-ms-original-file: 2023-09-15-preview/ListChannel.json */ /** * Sample code: List Channel. @@ -789,8 +803,7 @@ import java.util.Arrays; */ public final class ChannelsUpdateSamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/UpdateAlexaChannel.json + * x-ms-original-file: 2023-09-15-preview/UpdateAlexaChannel.json */ /** * Sample code: Update Alexa Channel. @@ -800,15 +813,15 @@ public final class ChannelsUpdateSamples { public static void updateAlexaChannel(com.azure.resourcemanager.botservice.BotServiceManager manager) { manager.channels() .updateWithResponse("OneResourceGroupName", "samplebotname", ChannelName.ALEXA_CHANNEL, - new BotChannelInner().withLocation("global") + new BotChannelInner() .withProperties(new AlexaChannel().withProperties( - new AlexaChannelProperties().withAlexaSkillId("XAlexaSkillIdX").withIsEnabled(true))), + new AlexaChannelProperties().withAlexaSkillId("XAlexaSkillIdX").withIsEnabled(true))) + .withLocation("global"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/ - * UpdateDirectLineSpeechChannel.json + * x-ms-original-file: 2023-09-15-preview/UpdateDirectLineSpeechChannel.json */ /** * Sample code: Update DirectLine Speech Channel. @@ -818,17 +831,16 @@ public final class ChannelsUpdateSamples { public static void updateDirectLineSpeechChannel(com.azure.resourcemanager.botservice.BotServiceManager manager) { manager.channels() .updateWithResponse("OneResourceGroupName", "samplebotname", ChannelName.DIRECT_LINE_SPEECH_CHANNEL, - new BotChannelInner().withLocation("global") - .withProperties(new DirectLineSpeechChannel().withProperties( - new DirectLineSpeechChannelProperties().withCognitiveServiceRegion("XcognitiveServiceRegionX") - .withCognitiveServiceSubscriptionKey("fakeTokenPlaceholder") - .withIsEnabled(true))), + new BotChannelInner().withProperties(new DirectLineSpeechChannel().withProperties( + new DirectLineSpeechChannelProperties().withCognitiveServiceRegion("XcognitiveServiceRegionX") + .withCognitiveServiceSubscriptionKey("fakeTokenPlaceholder") + .withIsEnabled(true))) + .withLocation("global"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/UpdateLineChannel.json + * x-ms-original-file: 2023-09-15-preview/UpdateLineChannel.json */ /** * Sample code: Update Line Channel. @@ -838,16 +850,16 @@ public final class ChannelsUpdateSamples { public static void updateLineChannel(com.azure.resourcemanager.botservice.BotServiceManager manager) { manager.channels() .updateWithResponse("OneResourceGroupName", "samplebotname", ChannelName.LINE_CHANNEL, - new BotChannelInner().withLocation("global") + new BotChannelInner() .withProperties(new LineChannel().withProperties(new LineChannelProperties().withLineRegistrations( Arrays.asList(new LineRegistration().withChannelSecret("fakeTokenPlaceholder") - .withChannelAccessToken("fakeTokenPlaceholder"))))), + .withChannelAccessToken("fakeTokenPlaceholder"))))) + .withLocation("global"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/UpdateChannel.json + * x-ms-original-file: 2023-09-15-preview/UpdateChannel.json */ /** * Sample code: Update Channel. @@ -857,11 +869,11 @@ public final class ChannelsUpdateSamples { public static void updateChannel(com.azure.resourcemanager.botservice.BotServiceManager manager) { manager.channels() .updateWithResponse("OneResourceGroupName", "samplebotname", ChannelName.EMAIL_CHANNEL, - new BotChannelInner().withLocation("global") - .withProperties( - new EmailChannel().withProperties(new EmailChannelProperties().withEmailAddress("a@b.com") - .withPassword("fakeTokenPlaceholder") - .withIsEnabled(true))), + new BotChannelInner().withProperties( + new EmailChannel().withProperties(new EmailChannelProperties().withEmailAddress("a@b.com") + .withPassword("fakeTokenPlaceholder") + .withIsEnabled(true))) + .withLocation("global"), com.azure.core.util.Context.NONE); } } @@ -879,8 +891,7 @@ import com.azure.resourcemanager.botservice.models.SiteInfo; */ public final class DirectLineRegenerateKeysSamples { /* - * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/ - * DirectlineRegenerateKeys.json + * x-ms-original-file: 2023-09-15-preview/DirectlineRegenerateKeys.json */ /** * Sample code: Regenerate Keys for DirectLine Channel Site. @@ -896,9 +907,7 @@ public final class DirectLineRegenerateKeysSamples { } /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/WebChatRegenerateKeys. - * json + * x-ms-original-file: 2023-09-15-preview/WebChatRegenerateKeys.json */ /** * Sample code: Regenerate Keys for WebChat Channel Site. @@ -915,6 +924,28 @@ public final class DirectLineRegenerateKeysSamples { } ``` +### Email_CreateSignInUrl + +```java +/** + * Samples for Email CreateSignInUrl. + */ +public final class EmailCreateSignInUrlSamples { + /* + * x-ms-original-file: 2023-09-15-preview/CreateEmailSignInUrl.json + */ + /** + * Sample code: Create Url. + * + * @param manager Entry point to BotServiceManager. + */ + public static void createUrl(com.azure.resourcemanager.botservice.BotServiceManager manager) { + manager.emails() + .createSignInUrlWithResponse("OneResourceGroupName", "samplebotname", com.azure.core.util.Context.NONE); + } +} +``` + ### HostSettings_Get ```java @@ -923,8 +954,7 @@ public final class DirectLineRegenerateKeysSamples { */ public final class HostSettingsGetSamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/GetHostSettings.json + * x-ms-original-file: 2023-09-15-preview/GetHostSettings.json */ /** * Sample code: Get Bot Host Settings. @@ -937,6 +967,97 @@ public final class HostSettingsGetSamples { } ``` +### NetworkSecurityPerimeterConfigurations_Get + +```java +/** + * Samples for NetworkSecurityPerimeterConfigurations Get. + */ +public final class NetworkSecurityPerimeterConfigurationsGetSamples { + /* + * x-ms-original-file: 2023-09-15-preview/GetNetworkSecurityPerimeterConfiguration.json + */ + /** + * Sample code: Get Network Security Perimeter Configuration. + * + * @param manager Entry point to BotServiceManager. + */ + public static void + getNetworkSecurityPerimeterConfiguration(com.azure.resourcemanager.botservice.BotServiceManager manager) { + manager.networkSecurityPerimeterConfigurations() + .getWithResponse("rgName", "botId", "00000000-0000-0000-0000-000000000000.associationName", + com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkSecurityPerimeterConfigurations_List + +```java +/** + * Samples for NetworkSecurityPerimeterConfigurations List. + */ +public final class NetworkSecurityPerimeterConfigurationsListSamples { + /* + * x-ms-original-file: 2023-09-15-preview/ListNetworkSecurityPerimeterConfigurations.json + */ + /** + * Sample code: List Network Security Perimeter Configurations. + * + * @param manager Entry point to BotServiceManager. + */ + public static void + listNetworkSecurityPerimeterConfigurations(com.azure.resourcemanager.botservice.BotServiceManager manager) { + manager.networkSecurityPerimeterConfigurations().list("rgName", "botId", com.azure.core.util.Context.NONE); + } +} +``` + +### NetworkSecurityPerimeterConfigurations_Reconcile + +```java +/** + * Samples for NetworkSecurityPerimeterConfigurations Reconcile. + */ +public final class NetworkSecurityPerimeterConfigurationsReconcileSamples { + /* + * x-ms-original-file: 2023-09-15-preview/ReconcileNetworkSecurityPerimeterConfiguration.json + */ + /** + * Sample code: Reconcile Network Security Perimeter Configuration. + * + * @param manager Entry point to BotServiceManager. + */ + public static void + reconcileNetworkSecurityPerimeterConfiguration(com.azure.resourcemanager.botservice.BotServiceManager manager) { + manager.networkSecurityPerimeterConfigurations() + .reconcile("rgName", "botId", "00000000-0000-0000-0000-000000000000.associationName", + com.azure.core.util.Context.NONE); + } +} +``` + +### OperationResults_Get + +```java +/** + * Samples for OperationResults Get. + */ +public final class OperationResultsGetSamples { + /* + * x-ms-original-file: 2023-09-15-preview/OperationResultsGet.json + */ + /** + * Sample code: Get operation result. + * + * @param manager Entry point to BotServiceManager. + */ + public static void getOperationResult(com.azure.resourcemanager.botservice.BotServiceManager manager) { + manager.operationResults().get("exampleid", com.azure.core.util.Context.NONE); + } +} +``` + ### Operations_List ```java @@ -945,8 +1066,7 @@ public final class HostSettingsGetSamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/GetOperations.json + * x-ms-original-file: 2023-09-15-preview/GetOperations.json */ /** * Sample code: Get Operations. @@ -959,3 +1079,148 @@ public final class OperationsListSamples { } ``` +### PrivateEndpointConnections_Create + +```java +import com.azure.resourcemanager.botservice.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.botservice.models.PrivateLinkServiceConnectionState; + +/** + * Samples for PrivateEndpointConnections Create. + */ +public final class PrivateEndpointConnectionsCreateSamples { + /* + * x-ms-original-file: 2023-09-15-preview/PutPrivateEndpointConnection.json + */ + /** + * Sample code: Put Private Endpoint Connection. + * + * @param manager Entry point to BotServiceManager. + */ + public static void putPrivateEndpointConnection(com.azure.resourcemanager.botservice.BotServiceManager manager) { + manager.privateEndpointConnections() + .define("{privateEndpointConnectionName}") + .withExistingBotService("res7687", "sto9699") + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) + .withDescription("Auto-Approved")) + .create(); + } +} +``` + +### PrivateEndpointConnections_Delete + +```java +/** + * Samples for PrivateEndpointConnections Delete. + */ +public final class PrivateEndpointConnectionsDeleteSamples { + /* + * x-ms-original-file: 2023-09-15-preview/DeletePrivateEndpointConnection.json + */ + /** + * Sample code: Delete Private Endpoint Connection. + * + * @param manager Entry point to BotServiceManager. + */ + public static void deletePrivateEndpointConnection(com.azure.resourcemanager.botservice.BotServiceManager manager) { + manager.privateEndpointConnections() + .deleteWithResponse("res6977", "sto2527", "{privateEndpointConnectionName}", + com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateEndpointConnections_Get + +```java +/** + * Samples for PrivateEndpointConnections Get. + */ +public final class PrivateEndpointConnectionsGetSamples { + /* + * x-ms-original-file: 2023-09-15-preview/GetPrivateEndpointConnection.json + */ + /** + * Sample code: Get Private Endpoint Connection. + * + * @param manager Entry point to BotServiceManager. + */ + public static void getPrivateEndpointConnection(com.azure.resourcemanager.botservice.BotServiceManager manager) { + manager.privateEndpointConnections() + .getWithResponse("res6977", "sto2527", "{privateEndpointConnectionName}", com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateEndpointConnections_List + +```java +/** + * Samples for PrivateEndpointConnections List. + */ +public final class PrivateEndpointConnectionsListSamples { + /* + * x-ms-original-file: 2023-09-15-preview/ListPrivateEndpointConnections.json + */ + /** + * Sample code: List Private Endpoint Connections. + * + * @param manager Entry point to BotServiceManager. + */ + public static void listPrivateEndpointConnections(com.azure.resourcemanager.botservice.BotServiceManager manager) { + manager.privateEndpointConnections().list("res6977", "sto2527", com.azure.core.util.Context.NONE); + } +} +``` + +### PrivateLinkResources_ListByBotResource + +```java +/** + * Samples for PrivateLinkResources ListByBotResource. + */ +public final class PrivateLinkResourcesListByBotResourceSamples { + /* + * x-ms-original-file: 2023-09-15-preview/ListPrivateLinkResources.json + */ + /** + * Sample code: List Private Link Resources. + * + * @param manager Entry point to BotServiceManager. + */ + public static void listPrivateLinkResources(com.azure.resourcemanager.botservice.BotServiceManager manager) { + manager.privateLinkResources() + .listByBotResourceWithResponse("res6977", "sto2527", com.azure.core.util.Context.NONE); + } +} +``` + +### QnAMakerEndpointKeys_Get + +```java +import com.azure.resourcemanager.botservice.models.QnAMakerEndpointKeysRequestBody; + +/** + * Samples for QnAMakerEndpointKeys Get. + */ +public final class QnAMakerEndpointKeysGetSamples { + /* + * x-ms-original-file: 2023-09-15-preview/ListQnAMakerEndpointKeys.json + */ + /** + * Sample code: List QnAMaker Endpoint Keys. + * + * @param manager Entry point to BotServiceManager. + */ + public static void listQnAMakerEndpointKeys(com.azure.resourcemanager.botservice.BotServiceManager manager) { + manager.qnAMakerEndpointKeys() + .getWithResponse( + new QnAMakerEndpointKeysRequestBody().withHostname("https://xxx.cognitiveservices.azure.com/") + .withAuthkey("fakeTokenPlaceholder"), + com.azure.core.util.Context.NONE); + } +} +``` + diff --git a/sdk/botservice/azure-resourcemanager-botservice/pom.xml b/sdk/botservice/azure-resourcemanager-botservice/pom.xml index 9ad4fd0847f3..3531f53fe3c9 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/pom.xml +++ b/sdk/botservice/azure-resourcemanager-botservice/pom.xml @@ -1,9 +1,9 @@ - + 4.0.0 com.azure @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for BotService Management - This package contains Microsoft Azure SDK for BotService Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Bot Service is a platform for creating smart conversational agents. Package tag package-2021-03-01. + This package contains Microsoft Azure SDK for BotService Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Bot Service is a platform for creating smart conversational agents. Package api-version 2023-09-15-preview. https://github.com/Azure/azure-sdk-for-java @@ -45,7 +45,7 @@ UTF-8 0 0 - false + true diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/BotServiceManager.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/BotServiceManager.java index 3725c0d211c8..01e0712fe688 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/BotServiceManager.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/BotServiceManager.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice; @@ -22,25 +22,39 @@ import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.botservice.fluent.AzureBotService; -import com.azure.resourcemanager.botservice.implementation.AzureBotServiceBuilder; +import com.azure.resourcemanager.botservice.fluent.BotServiceManagementClient; import com.azure.resourcemanager.botservice.implementation.BotConnectionsImpl; +import com.azure.resourcemanager.botservice.implementation.BotServiceManagementClientBuilder; import com.azure.resourcemanager.botservice.implementation.BotsImpl; import com.azure.resourcemanager.botservice.implementation.ChannelsImpl; import com.azure.resourcemanager.botservice.implementation.DirectLinesImpl; +import com.azure.resourcemanager.botservice.implementation.EmailsImpl; import com.azure.resourcemanager.botservice.implementation.HostSettingsImpl; +import com.azure.resourcemanager.botservice.implementation.NetworkSecurityPerimeterConfigurationsImpl; +import com.azure.resourcemanager.botservice.implementation.OperationResultsImpl; import com.azure.resourcemanager.botservice.implementation.OperationsImpl; +import com.azure.resourcemanager.botservice.implementation.PrivateEndpointConnectionsImpl; +import com.azure.resourcemanager.botservice.implementation.PrivateLinkResourcesImpl; +import com.azure.resourcemanager.botservice.implementation.QnAMakerEndpointKeysImpl; import com.azure.resourcemanager.botservice.models.BotConnections; import com.azure.resourcemanager.botservice.models.Bots; import com.azure.resourcemanager.botservice.models.Channels; import com.azure.resourcemanager.botservice.models.DirectLines; +import com.azure.resourcemanager.botservice.models.Emails; import com.azure.resourcemanager.botservice.models.HostSettings; +import com.azure.resourcemanager.botservice.models.NetworkSecurityPerimeterConfigurations; +import com.azure.resourcemanager.botservice.models.OperationResults; import com.azure.resourcemanager.botservice.models.Operations; +import com.azure.resourcemanager.botservice.models.PrivateEndpointConnections; +import com.azure.resourcemanager.botservice.models.PrivateLinkResources; +import com.azure.resourcemanager.botservice.models.QnAMakerEndpointKeys; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; @@ -49,24 +63,36 @@ * Azure Bot Service is a platform for creating smart conversational agents. */ public final class BotServiceManager { + private Operations operations; + private Bots bots; + private PrivateEndpointConnections privateEndpointConnections; + + private NetworkSecurityPerimeterConfigurations networkSecurityPerimeterConfigurations; + + private Emails emails; + + private PrivateLinkResources privateLinkResources; + private Channels channels; private DirectLines directLines; - private Operations operations; - private BotConnections botConnections; + private QnAMakerEndpointKeys qnAMakerEndpointKeys; + private HostSettings hostSettings; - private final AzureBotService clientObject; + private OperationResults operationResults; + + private final BotServiceManagementClient clientObject; private BotServiceManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = new AzureBotServiceBuilder().pipeline(httpPipeline) + this.clientObject = new BotServiceManagementClientBuilder().pipeline(httpPipeline) .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) .subscriptionId(profile.getSubscriptionId()) .defaultPollInterval(defaultPollInterval) @@ -113,6 +139,9 @@ public static Configurable configure() { */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); + private static final String SDK_VERSION = "version"; + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-resourcemanager-botservice.properties"); private HttpClient httpClient; private HttpLogOptions httpLogOptions; @@ -220,12 +249,14 @@ public BotServiceManager authenticate(TokenCredential credential, AzureProfile p Objects.requireNonNull(credential, "'credential' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + StringBuilder userAgentBuilder = new StringBuilder(); userAgentBuilder.append("azsdk-java") .append("-") .append("com.azure.resourcemanager.botservice") .append("/") - .append("1.0.0"); + .append(clientVersion); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) @@ -271,6 +302,18 @@ public BotServiceManager authenticate(TokenCredential credential, AzureProfile p } } + /** + * Gets the resource collection API of Operations. + * + * @return Resource collection API of Operations. + */ + public Operations operations() { + if (this.operations == null) { + this.operations = new OperationsImpl(clientObject.getOperations(), this); + } + return operations; + } + /** * Gets the resource collection API of Bots. It manages Bot. * @@ -283,6 +326,56 @@ public Bots bots() { return bots; } + /** + * Gets the resource collection API of PrivateEndpointConnections. It manages PrivateEndpointConnection. + * + * @return Resource collection API of PrivateEndpointConnections. + */ + public PrivateEndpointConnections privateEndpointConnections() { + if (this.privateEndpointConnections == null) { + this.privateEndpointConnections + = new PrivateEndpointConnectionsImpl(clientObject.getPrivateEndpointConnections(), this); + } + return privateEndpointConnections; + } + + /** + * Gets the resource collection API of NetworkSecurityPerimeterConfigurations. + * + * @return Resource collection API of NetworkSecurityPerimeterConfigurations. + */ + public NetworkSecurityPerimeterConfigurations networkSecurityPerimeterConfigurations() { + if (this.networkSecurityPerimeterConfigurations == null) { + this.networkSecurityPerimeterConfigurations = new NetworkSecurityPerimeterConfigurationsImpl( + clientObject.getNetworkSecurityPerimeterConfigurations(), this); + } + return networkSecurityPerimeterConfigurations; + } + + /** + * Gets the resource collection API of Emails. + * + * @return Resource collection API of Emails. + */ + public Emails emails() { + if (this.emails == null) { + this.emails = new EmailsImpl(clientObject.getEmails(), this); + } + return emails; + } + + /** + * Gets the resource collection API of PrivateLinkResources. + * + * @return Resource collection API of PrivateLinkResources. + */ + public PrivateLinkResources privateLinkResources() { + if (this.privateLinkResources == null) { + this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this); + } + return privateLinkResources; + } + /** * Gets the resource collection API of Channels. * @@ -307,18 +400,6 @@ public DirectLines directLines() { return directLines; } - /** - * Gets the resource collection API of Operations. - * - * @return Resource collection API of Operations. - */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - /** * Gets the resource collection API of BotConnections. It manages ConnectionSetting. * @@ -331,6 +412,18 @@ public BotConnections botConnections() { return botConnections; } + /** + * Gets the resource collection API of QnAMakerEndpointKeys. + * + * @return Resource collection API of QnAMakerEndpointKeys. + */ + public QnAMakerEndpointKeys qnAMakerEndpointKeys() { + if (this.qnAMakerEndpointKeys == null) { + this.qnAMakerEndpointKeys = new QnAMakerEndpointKeysImpl(clientObject.getQnAMakerEndpointKeys(), this); + } + return qnAMakerEndpointKeys; + } + /** * Gets the resource collection API of HostSettings. * @@ -344,12 +437,24 @@ public HostSettings hostSettings() { } /** - * Gets wrapped service client AzureBotService providing direct access to the underlying auto-generated API - * implementation, based on Azure REST API. + * Gets the resource collection API of OperationResults. + * + * @return Resource collection API of OperationResults. + */ + public OperationResults operationResults() { + if (this.operationResults == null) { + this.operationResults = new OperationResultsImpl(clientObject.getOperationResults(), this); + } + return operationResults; + } + + /** + * Gets wrapped service client BotServiceManagementClient providing direct access to the underlying auto-generated + * API implementation, based on Azure REST API. * - * @return Wrapped service client AzureBotService. + * @return Wrapped service client BotServiceManagementClient. */ - public AzureBotService serviceClient() { + public BotServiceManagementClient serviceClient() { return this.clientObject; } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/BotConnectionsClient.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/BotConnectionsClient.java index c58e414181cd..54afc95fdc22 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/BotConnectionsClient.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/BotConnectionsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.fluent; @@ -16,32 +16,10 @@ * An instance of this class provides access to all the operations defined in BotConnectionsClient. */ public interface BotConnectionsClient { - /** - * Lists the available Service Providers for creating Connection Settings. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service providers response along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listServiceProvidersWithResponse(Context context); - - /** - * Lists the available Service Providers for creating Connection Settings. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service providers response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ServiceProviderResponseListInner listServiceProviders(); - /** * Get a Connection Setting registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param connectionName The name of the Bot Service Connection Setting resource. * @param context The context to associate with this operation. @@ -51,13 +29,13 @@ public interface BotConnectionsClient { * @return a Connection Setting registration for a Bot Service along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithSecretsWithResponse(String resourceGroupName, String resourceName, + Response getWithResponse(String resourceGroupName, String resourceName, String connectionName, Context context); /** * Get a Connection Setting registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param connectionName The name of the Bot Service Connection Setting resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -66,12 +44,12 @@ Response listWithSecretsWithResponse(String resourceGrou * @return a Connection Setting registration for a Bot Service. */ @ServiceMethod(returns = ReturnType.SINGLE) - ConnectionSettingInner listWithSecrets(String resourceGroupName, String resourceName, String connectionName); + ConnectionSettingInner get(String resourceGroupName, String resourceName, String connectionName); /** * Register a new Auth Connection for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param connectionName The name of the Bot Service Connection Setting resource. * @param parameters The parameters to provide for creating the Connection Setting. @@ -88,7 +66,7 @@ Response createWithResponse(String resourceGroupName, St /** * Register a new Auth Connection for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param connectionName The name of the Bot Service Connection Setting resource. * @param parameters The parameters to provide for creating the Connection Setting. @@ -104,7 +82,7 @@ ConnectionSettingInner create(String resourceGroupName, String resourceName, Str /** * Updates a Connection Setting registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param connectionName The name of the Bot Service Connection Setting resource. * @param parameters The parameters to provide for updating the Connection Setting. @@ -121,7 +99,7 @@ Response updateWithResponse(String resourceGroupName, St /** * Updates a Connection Setting registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param connectionName The name of the Bot Service Connection Setting resource. * @param parameters The parameters to provide for updating the Connection Setting. @@ -135,89 +113,111 @@ ConnectionSettingInner update(String resourceGroupName, String resourceName, Str ConnectionSettingInner parameters); /** - * Get a Connection Setting registration for a Bot Service. + * Deletes a Connection Setting registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param connectionName The name of the Bot Service Connection Setting resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Connection Setting registration for a Bot Service along with {@link Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String resourceName, - String connectionName, Context context); + Response deleteWithResponse(String resourceGroupName, String resourceName, String connectionName, + Context context); /** - * Get a Connection Setting registration for a Bot Service. + * Deletes a Connection Setting registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param connectionName The name of the Bot Service Connection Setting resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Connection Setting registration for a Bot Service. */ @ServiceMethod(returns = ReturnType.SINGLE) - ConnectionSettingInner get(String resourceGroupName, String resourceName, String connectionName); + void delete(String resourceGroupName, String resourceName, String connectionName); /** - * Deletes a Connection Setting registration for a Bot Service. + * Returns all the Connection Settings registered to a particular BotService resource. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of bot service connection settings response as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByBotService(String resourceGroupName, String resourceName); + + /** + * Returns all the Connection Settings registered to a particular BotService resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return the list of bot service connection settings response as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String resourceName, String connectionName, + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByBotService(String resourceGroupName, String resourceName, Context context); /** - * Deletes a Connection Setting registration for a Bot Service. + * Get a Connection Setting registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param connectionName The name of the Bot Service Connection Setting resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Connection Setting registration for a Bot Service along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName, String connectionName); + Response listWithSecretsWithResponse(String resourceGroupName, String resourceName, + String connectionName, Context context); /** - * Returns all the Connection Settings registered to a particular BotService resource. + * Get a Connection Setting registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. + * @param connectionName The name of the Bot Service Connection Setting resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service connection settings response as paginated response with {@link PagedIterable}. + * @return a Connection Setting registration for a Bot Service. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByBotService(String resourceGroupName, String resourceName); + @ServiceMethod(returns = ReturnType.SINGLE) + ConnectionSettingInner listWithSecrets(String resourceGroupName, String resourceName, String connectionName); /** - * Returns all the Connection Settings registered to a particular BotService resource. + * Lists the available Service Providers for creating Connection Settings. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service connection settings response as paginated response with {@link PagedIterable}. + * @return the list of bot service providers response along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByBotService(String resourceGroupName, String resourceName, - Context context); + @ServiceMethod(returns = ReturnType.SINGLE) + Response listServiceProvidersWithResponse(Context context); + + /** + * Lists the available Service Providers for creating Connection Settings. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of bot service providers response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ServiceProviderResponseListInner listServiceProviders(); } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/AzureBotService.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/BotServiceManagementClient.java similarity index 53% rename from sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/AzureBotService.java rename to sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/BotServiceManagementClient.java index 5c4458a3bee0..543be5212bc5 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/AzureBotService.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/BotServiceManagementClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.fluent; @@ -8,30 +8,30 @@ import java.time.Duration; /** - * The interface for AzureBotService class. + * The interface for BotServiceManagementClient class. */ -public interface AzureBotService { +public interface BotServiceManagementClient { /** - * Gets Azure Subscription ID. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ String getEndpoint(); /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ String getApiVersion(); + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + String getSubscriptionId(); + /** * Gets The HTTP pipeline to send requests through. * @@ -46,6 +46,13 @@ public interface AzureBotService { */ Duration getDefaultPollInterval(); + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + OperationsClient getOperations(); + /** * Gets the BotsClient object to access its operations. * @@ -53,6 +60,34 @@ public interface AzureBotService { */ BotsClient getBots(); + /** + * Gets the PrivateEndpointConnectionsClient object to access its operations. + * + * @return the PrivateEndpointConnectionsClient object. + */ + PrivateEndpointConnectionsClient getPrivateEndpointConnections(); + + /** + * Gets the NetworkSecurityPerimeterConfigurationsClient object to access its operations. + * + * @return the NetworkSecurityPerimeterConfigurationsClient object. + */ + NetworkSecurityPerimeterConfigurationsClient getNetworkSecurityPerimeterConfigurations(); + + /** + * Gets the EmailsClient object to access its operations. + * + * @return the EmailsClient object. + */ + EmailsClient getEmails(); + + /** + * Gets the PrivateLinkResourcesClient object to access its operations. + * + * @return the PrivateLinkResourcesClient object. + */ + PrivateLinkResourcesClient getPrivateLinkResources(); + /** * Gets the ChannelsClient object to access its operations. * @@ -68,18 +103,18 @@ public interface AzureBotService { DirectLinesClient getDirectLines(); /** - * Gets the OperationsClient object to access its operations. + * Gets the BotConnectionsClient object to access its operations. * - * @return the OperationsClient object. + * @return the BotConnectionsClient object. */ - OperationsClient getOperations(); + BotConnectionsClient getBotConnections(); /** - * Gets the BotConnectionsClient object to access its operations. + * Gets the QnAMakerEndpointKeysClient object to access its operations. * - * @return the BotConnectionsClient object. + * @return the QnAMakerEndpointKeysClient object. */ - BotConnectionsClient getBotConnections(); + QnAMakerEndpointKeysClient getQnAMakerEndpointKeys(); /** * Gets the HostSettingsClient object to access its operations. @@ -87,4 +122,11 @@ public interface AzureBotService { * @return the HostSettingsClient object. */ HostSettingsClient getHostSettings(); + + /** + * Gets the OperationResultsClient object to access its operations. + * + * @return the OperationResultsClient object. + */ + OperationResultsClient getOperationResults(); } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/BotsClient.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/BotsClient.java index f3580522bb42..e31a599c7191 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/BotsClient.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/BotsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.fluent; @@ -18,11 +18,10 @@ */ public interface BotsClient { /** - * Creates a Bot Service. Bot Service is a resource group wide resource type. + * Returns a BotService specified by the parameters. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. - * @param parameters The parameters to provide for the created bot. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -30,27 +29,25 @@ public interface BotsClient { * @return bot resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createWithResponse(String resourceGroupName, String resourceName, BotInner parameters, - Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, Context context); /** - * Creates a Bot Service. Bot Service is a resource group wide resource type. + * Returns a BotService specified by the parameters. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. - * @param parameters The parameters to provide for the created bot. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return bot resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - BotInner create(String resourceGroupName, String resourceName, BotInner parameters); + BotInner getByResourceGroup(String resourceGroupName, String resourceName); /** - * Updates a Bot Service. + * Creates a Bot Service. Bot Service is a resource group wide resource type. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param parameters The parameters to provide for the created bot. * @param context The context to associate with this operation. @@ -60,13 +57,13 @@ Response createWithResponse(String resourceGroupName, String resourceN * @return bot resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String resourceName, BotInner parameters, + Response createWithResponse(String resourceGroupName, String resourceName, BotInner parameters, Context context); /** - * Updates a Bot Service. + * Creates a Bot Service. Bot Service is a resource group wide resource type. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param parameters The parameters to provide for the created bot. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -75,65 +72,68 @@ Response updateWithResponse(String resourceGroupName, String resourceN * @return bot resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - BotInner update(String resourceGroupName, String resourceName, BotInner parameters); + BotInner create(String resourceGroupName, String resourceName, BotInner parameters); /** - * Deletes a Bot Service from the resource group. + * Updates a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. + * @param parameters The parameters to provide for the created bot. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return bot resource definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String resourceName, Context context); + Response updateWithResponse(String resourceGroupName, String resourceName, BotInner parameters, + Context context); /** - * Deletes a Bot Service from the resource group. + * Updates a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. + * @param parameters The parameters to provide for the created bot. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bot resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String resourceName); + BotInner update(String resourceGroupName, String resourceName, BotInner parameters); /** - * Returns a BotService specified by the parameters. + * Deletes a Bot Service from the resource group. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bot resource definition along with {@link Response}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, Context context); + Response deleteWithResponse(String resourceGroupName, String resourceName, Context context); /** - * Returns a BotService specified by the parameters. + * Deletes a Bot Service from the resource group. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bot resource definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - BotInner getByResourceGroup(String resourceGroupName, String resourceName); + void delete(String resourceGroupName, String resourceName); /** * Returns all the resources of a particular type belonging to a resource group. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -145,7 +145,7 @@ Response updateWithResponse(String resourceGroupName, String resourceN /** * Returns all the resources of a particular type belonging to a resource group. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -180,7 +180,7 @@ Response updateWithResponse(String resourceGroupName, String resourceN /** * Check whether a bot name is available. * - * @param parameters The request body parameters to provide for the check name availability request. + * @param parameters The request body. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -195,7 +195,7 @@ Response updateWithResponse(String resourceGroupName, String resourceN /** * Check whether a bot name is available. * - * @param parameters The request body parameters to provide for the check name availability request. + * @param parameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/ChannelsClient.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/ChannelsClient.java index bead062dfcb9..d86aefee3e7e 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/ChannelsClient.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/ChannelsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.fluent; @@ -17,13 +17,43 @@ * An instance of this class provides access to all the operations defined in ChannelsClient. */ public interface ChannelsClient { + /** + * Returns a BotService Channel registration specified by the parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param channelName The name of the Bot resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bot channel resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String resourceName, String channelName, + Context context); + + /** + * Returns a BotService Channel registration specified by the parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param channelName The name of the Bot resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bot channel resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BotChannelInner get(String resourceGroupName, String resourceName, String channelName); + /** * Creates a Channel registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Channel resource. - * @param parameters The parameters to provide for the created bot. + * @param parameters Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -37,10 +67,10 @@ Response createWithResponse(String resourceGroupName, String re /** * Creates a Channel registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Channel resource. - * @param parameters The parameters to provide for the created bot. + * @param parameters Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -53,7 +83,7 @@ BotChannelInner create(String resourceGroupName, String resourceName, ChannelNam /** * Updates a Channel registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Channel resource. * @param parameters The parameters to provide for the created bot. @@ -70,7 +100,7 @@ Response updateWithResponse(String resourceGroupName, String re /** * Updates a Channel registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Channel resource. * @param parameters The parameters to provide for the created bot. @@ -86,7 +116,7 @@ BotChannelInner update(String resourceGroupName, String resourceName, ChannelNam /** * Deletes a Channel registration from a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Bot resource. * @param context The context to associate with this operation. @@ -102,7 +132,7 @@ Response deleteWithResponse(String resourceGroupName, String resourceName, /** * Deletes a Channel registration from a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Bot resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -113,39 +143,36 @@ Response deleteWithResponse(String resourceGroupName, String resourceName, void delete(String resourceGroupName, String resourceName, String channelName); /** - * Returns a BotService Channel registration specified by the parameters. + * Returns all the Channel registrations of a particular BotService resource. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. - * @param channelName The name of the Bot resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bot channel resource definition along with {@link Response}. + * @return the list of bot service channel operation response as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String resourceName, String channelName, - Context context); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, String resourceName); /** - * Returns a BotService Channel registration specified by the parameters. + * Returns all the Channel registrations of a particular BotService resource. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. - * @param channelName The name of the Bot resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bot channel resource definition. + * @return the list of bot service channel operation response as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - BotChannelInner get(String resourceGroupName, String resourceName, String channelName); + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, String resourceName, Context context); /** * Lists a Channel registration for a Bot Service including secrets. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Channel resource. * @param context The context to associate with this operation. @@ -161,7 +188,7 @@ Response listWithKeysWithResponse(String resou /** * Lists a Channel registration for a Bot Service including secrets. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Channel resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -172,31 +199,4 @@ Response listWithKeysWithResponse(String resou @ServiceMethod(returns = ReturnType.SINGLE) ListChannelWithKeysResponseInner listWithKeys(String resourceGroupName, String resourceName, ChannelName channelName); - - /** - * Returns all the Channel registrations of a particular BotService resource. - * - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service channel operation response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, String resourceName); - - /** - * Returns all the Channel registrations of a particular BotService resource. - * - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service channel operation response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, String resourceName, Context context); } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/DirectLinesClient.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/DirectLinesClient.java index 287c8822fc3c..0683e91303ee 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/DirectLinesClient.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/DirectLinesClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.fluent; @@ -19,7 +19,7 @@ public interface DirectLinesClient { /** * Regenerates secret keys and returns them for the DirectLine Channel of a particular BotService resource. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Channel resource for which keys are to be regenerated. * @param parameters The parameters to provide for the created bot. @@ -36,7 +36,7 @@ Response regenerateKeysWithResponse(String resourceGroupName, S /** * Regenerates secret keys and returns them for the DirectLine Channel of a particular BotService resource. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Channel resource for which keys are to be regenerated. * @param parameters The parameters to provide for the created bot. diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/EmailsClient.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/EmailsClient.java new file mode 100644 index 000000000000..23f86bdf11ec --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/EmailsClient.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.botservice.fluent.models.CreateEmailSignInUrlResponseInner; + +/** + * An instance of this class provides access to all the operations defined in EmailsClient. + */ +public interface EmailsClient { + /** + * Creates an email channel sign in url for a Bot Service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the ARM create email sign in url operation response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createSignInUrlWithResponse(String resourceGroupName, + String resourceName, Context context); + + /** + * Creates an email channel sign in url for a Bot Service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the ARM create email sign in url operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CreateEmailSignInUrlResponseInner createSignInUrl(String resourceGroupName, String resourceName); +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/HostSettingsClient.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/HostSettingsClient.java index 200347909b2e..c4545a4d006d 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/HostSettingsClient.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/HostSettingsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.fluent; diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/NetworkSecurityPerimeterConfigurationsClient.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/NetworkSecurityPerimeterConfigurationsClient.java new file mode 100644 index 000000000000..3052234bc57f --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/NetworkSecurityPerimeterConfigurationsClient.java @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.botservice.fluent.models.NetworkSecurityPerimeterConfigurationInner; + +/** + * An instance of this class provides access to all the operations defined in + * NetworkSecurityPerimeterConfigurationsClient. + */ +public interface NetworkSecurityPerimeterConfigurationsClient { + /** + * Gets the specified Network Security Perimeter configuration associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param networkSecurityPerimeterConfigurationName The resource association Name. Composed of parameter guid and + * association name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Network Security Perimeter configuration associated with the Bot along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String resourceName, + String networkSecurityPerimeterConfigurationName, Context context); + + /** + * Gets the specified Network Security Perimeter configuration associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param networkSecurityPerimeterConfigurationName The resource association Name. Composed of parameter guid and + * association name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Network Security Perimeter configuration associated with the Bot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkSecurityPerimeterConfigurationInner get(String resourceGroupName, String resourceName, + String networkSecurityPerimeterConfigurationName); + + /** + * List Network Security Perimeter configurations associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the List NetworkSecurityPerimeterConfiguration operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName); + + /** + * List Network Security Perimeter configurations associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the List NetworkSecurityPerimeterConfiguration operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName, + Context context); + + /** + * Reconcile the specified Network Security Perimeter configuration associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param networkSecurityPerimeterConfigurationName The resource association Name. Composed of parameter guid and + * association name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkSecurityPerimeterConfigurationInner> + beginReconcile(String resourceGroupName, String resourceName, String networkSecurityPerimeterConfigurationName); + + /** + * Reconcile the specified Network Security Perimeter configuration associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param networkSecurityPerimeterConfigurationName The resource association Name. Composed of parameter guid and + * association name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, NetworkSecurityPerimeterConfigurationInner> + beginReconcile(String resourceGroupName, String resourceName, String networkSecurityPerimeterConfigurationName, + Context context); + + /** + * Reconcile the specified Network Security Perimeter configuration associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param networkSecurityPerimeterConfigurationName The resource association Name. Composed of parameter guid and + * association name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkSecurityPerimeterConfigurationInner reconcile(String resourceGroupName, String resourceName, + String networkSecurityPerimeterConfigurationName); + + /** + * Reconcile the specified Network Security Perimeter configuration associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param networkSecurityPerimeterConfigurationName The resource association Name. Composed of parameter guid and + * association name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + NetworkSecurityPerimeterConfigurationInner reconcile(String resourceGroupName, String resourceName, + String networkSecurityPerimeterConfigurationName, Context context); +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/OperationResultsClient.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/OperationResultsClient.java new file mode 100644 index 000000000000..13f6e3dd3f36 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/OperationResultsClient.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.botservice.fluent.models.OperationResultsDescriptionInner; + +/** + * An instance of this class provides access to all the operations defined in OperationResultsClient. + */ +public interface OperationResultsClient { + /** + * Get the operation result for a long running operation. + * + * @param operationResultId The ID of the operation result to get. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the operation result for a long running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OperationResultsDescriptionInner> + beginGet(String operationResultId); + + /** + * Get the operation result for a long running operation. + * + * @param operationResultId The ID of the operation result to get. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the operation result for a long running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, OperationResultsDescriptionInner> + beginGet(String operationResultId, Context context); + + /** + * Get the operation result for a long running operation. + * + * @param operationResultId The ID of the operation result to get. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation result for a long running operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationResultsDescriptionInner get(String operationResultId); + + /** + * Get the operation result for a long running operation. + * + * @param operationResultId The ID of the operation result to get. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation result for a long running operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationResultsDescriptionInner get(String operationResultId, Context context); +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/OperationsClient.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/OperationsClient.java index a6e0340ff354..59ae8d7f45d6 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/OperationsClient.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/OperationsClient.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.fluent; @@ -15,7 +15,7 @@ */ public interface OperationsClient { /** - * Lists all the available BotService operations. + * List the operations for the provider. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -25,7 +25,7 @@ public interface OperationsClient { PagedIterable list(); /** - * Lists all the available BotService operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/PrivateEndpointConnectionsClient.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/PrivateEndpointConnectionsClient.java new file mode 100644 index 000000000000..d3c79a5dcca0 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/PrivateEndpointConnectionsClient.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.botservice.fluent.models.PrivateEndpointConnectionInner; + +/** + * An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. + */ +public interface PrivateEndpointConnectionsClient { + /** + * Gets the specified private endpoint connection associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified private endpoint connection associated with the Bot along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String resourceName, + String privateEndpointConnectionName, Context context); + + /** + * Gets the specified private endpoint connection associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified private endpoint connection associated with the Bot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionInner get(String resourceGroupName, String resourceName, + String privateEndpointConnectionName); + + /** + * Update the state of specified private endpoint connection associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param properties The private endpoint connection properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createWithResponse(String resourceGroupName, String resourceName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner properties, Context context); + + /** + * Update the state of specified private endpoint connection associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param properties The private endpoint connection properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionInner create(String resourceGroupName, String resourceName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner properties); + + /** + * Deletes the specified private endpoint connection associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String resourceGroupName, String resourceName, + String privateEndpointConnectionName, Context context); + + /** + * Deletes the specified private endpoint connection associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String resourceName, String privateEndpointConnectionName); + + /** + * List all the private endpoint connections associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account as paginated response + * with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName); + + /** + * List all the private endpoint connections associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account as paginated response + * with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String resourceName, Context context); +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/PrivateLinkResourcesClient.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/PrivateLinkResourcesClient.java new file mode 100644 index 000000000000..f779820e35ee --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/PrivateLinkResourcesClient.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.botservice.fluent.models.PrivateLinkResourceListResultInner; + +/** + * An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. + */ +public interface PrivateLinkResourcesClient { + /** + * Gets the private link resources that need to be created for a Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private link resources that need to be created for a Bot along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listByBotResourceWithResponse(String resourceGroupName, + String resourceName, Context context); + + /** + * Gets the private link resources that need to be created for a Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private link resources that need to be created for a Bot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateLinkResourceListResultInner listByBotResource(String resourceGroupName, String resourceName); +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/QnAMakerEndpointKeysClient.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/QnAMakerEndpointKeysClient.java new file mode 100644 index 000000000000..c89ced70e23b --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/QnAMakerEndpointKeysClient.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.botservice.fluent.models.QnAMakerEndpointKeysResponseInner; +import com.azure.resourcemanager.botservice.models.QnAMakerEndpointKeysRequestBody; + +/** + * An instance of this class provides access to all the operations defined in QnAMakerEndpointKeysClient. + */ +public interface QnAMakerEndpointKeysClient { + /** + * Lists the QnA Maker endpoint keys. + * + * @param parameters The request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schema for EndpointKeys generate/refresh operations along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(QnAMakerEndpointKeysRequestBody parameters, + Context context); + + /** + * Lists the QnA Maker endpoint keys. + * + * @param parameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schema for EndpointKeys generate/refresh operations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + QnAMakerEndpointKeysResponseInner get(QnAMakerEndpointKeysRequestBody parameters); +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/BotChannelInner.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/BotChannelInner.java index a3f80c5f3d42..cb20d4a61d42 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/BotChannelInner.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/BotChannelInner.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -20,12 +21,22 @@ * Bot channel resource definition. */ @Fluent -public class BotChannelInner extends Resource { +public class BotChannelInner extends ProxyResource { /* * The set of properties specific to bot channel resource */ private Channel properties; + /* + * Specifies the location of the resource. + */ + private String location; + + /* + * Contains resource tags defined as key/value pairs. + */ + private Map tags; + /* * Gets or sets the SKU of the resource. */ @@ -37,7 +48,7 @@ public class BotChannelInner extends Resource { private Kind kind; /* - * Entity Tag + * Entity Tag. */ private String etag; @@ -46,6 +57,11 @@ public class BotChannelInner extends Resource { */ private List zones; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -87,6 +103,46 @@ public BotChannelInner withProperties(Channel properties) { return this; } + /** + * Get the location property: Specifies the location of the resource. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: Specifies the location of the resource. + * + * @param location the location value to set. + * @return the BotChannelInner object itself. + */ + public BotChannelInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the tags property: Contains resource tags defined as key/value pairs. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Contains resource tags defined as key/value pairs. + * + * @param tags the tags value to set. + * @return the BotChannelInner object itself. + */ + public BotChannelInner withTags(Map tags) { + this.tags = tags; + return this; + } + /** * Get the sku property: Gets or sets the SKU of the resource. * @@ -167,6 +223,26 @@ BotChannelInner withZones(List zones) { return this; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Set the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @param systemData the systemData value to set. + * @return the BotChannelInner object itself. + */ + BotChannelInner withSystemData(SystemData systemData) { + this.systemData = systemData; + return this; + } + /** * Get the type property: The type of the resource. * @@ -197,47 +273,15 @@ public String id() { return this.id; } - /** - * {@inheritDoc} - */ - @Override - public BotChannelInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BotChannelInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - if (sku() != null) { - sku().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("sku", this.sku); jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); jsonWriter.writeStringField("etag", this.etag); @@ -266,13 +310,13 @@ public static BotChannelInner fromJson(JsonReader jsonReader) throws IOException deserializedBotChannelInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedBotChannelInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedBotChannelInner.properties = Channel.fromJson(reader); } else if ("location".equals(fieldName)) { - deserializedBotChannelInner.withLocation(reader.getString()); + deserializedBotChannelInner.location = reader.getString(); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedBotChannelInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedBotChannelInner.properties = Channel.fromJson(reader); + deserializedBotChannelInner.tags = tags; } else if ("sku".equals(fieldName)) { deserializedBotChannelInner.sku = Sku.fromJson(reader); } else if ("kind".equals(fieldName)) { @@ -282,6 +326,8 @@ public static BotChannelInner fromJson(JsonReader jsonReader) throws IOException } else if ("zones".equals(fieldName)) { List zones = reader.readArray(reader1 -> reader1.getString()); deserializedBotChannelInner.zones = zones; + } else if ("systemData".equals(fieldName)) { + deserializedBotChannelInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/BotInner.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/BotInner.java index 6dc7955ba474..5cec4ecc5769 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/BotInner.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/BotInner.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -20,12 +21,22 @@ * Bot resource definition. */ @Fluent -public final class BotInner extends Resource { +public final class BotInner extends ProxyResource { /* * The set of properties specific to bot resource */ private BotProperties properties; + /* + * Specifies the location of the resource. + */ + private String location; + + /* + * Contains resource tags defined as key/value pairs. + */ + private Map tags; + /* * Gets or sets the SKU of the resource. */ @@ -37,7 +48,7 @@ public final class BotInner extends Resource { private Kind kind; /* - * Entity Tag + * Entity Tag. */ private String etag; @@ -46,6 +57,11 @@ public final class BotInner extends Resource { */ private List zones; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -87,6 +103,46 @@ public BotInner withProperties(BotProperties properties) { return this; } + /** + * Get the location property: Specifies the location of the resource. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: Specifies the location of the resource. + * + * @param location the location value to set. + * @return the BotInner object itself. + */ + public BotInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the tags property: Contains resource tags defined as key/value pairs. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Contains resource tags defined as key/value pairs. + * + * @param tags the tags value to set. + * @return the BotInner object itself. + */ + public BotInner withTags(Map tags) { + this.tags = tags; + return this; + } + /** * Get the sku property: Gets or sets the SKU of the resource. * @@ -156,6 +212,15 @@ public List zones() { return this.zones; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the type property: The type of the resource. * @@ -186,47 +251,15 @@ public String id() { return this.id; } - /** - * {@inheritDoc} - */ - @Override - public BotInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BotInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - if (sku() != null) { - sku().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("sku", this.sku); jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); jsonWriter.writeStringField("etag", this.etag); @@ -255,13 +288,13 @@ public static BotInner fromJson(JsonReader jsonReader) throws IOException { deserializedBotInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedBotInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedBotInner.properties = BotProperties.fromJson(reader); } else if ("location".equals(fieldName)) { - deserializedBotInner.withLocation(reader.getString()); + deserializedBotInner.location = reader.getString(); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedBotInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedBotInner.properties = BotProperties.fromJson(reader); + deserializedBotInner.tags = tags; } else if ("sku".equals(fieldName)) { deserializedBotInner.sku = Sku.fromJson(reader); } else if ("kind".equals(fieldName)) { @@ -271,6 +304,8 @@ public static BotInner fromJson(JsonReader jsonReader) throws IOException { } else if ("zones".equals(fieldName)) { List zones = reader.readArray(reader1 -> reader1.getString()); deserializedBotInner.zones = zones; + } else if ("systemData".equals(fieldName)) { + deserializedBotInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/CheckNameAvailabilityResponseBodyInner.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/CheckNameAvailabilityResponseBodyInner.java index d0ce1ac628a9..21eea0dc5202 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/CheckNameAvailabilityResponseBodyInner.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/CheckNameAvailabilityResponseBodyInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * The response body returned for a request to Bot Service Management to check availability of a bot name. */ -@Fluent +@Immutable public final class CheckNameAvailabilityResponseBodyInner implements JsonSerializable { /* @@ -35,7 +35,7 @@ public final class CheckNameAvailabilityResponseBodyInner /** * Creates an instance of CheckNameAvailabilityResponseBodyInner class. */ - public CheckNameAvailabilityResponseBodyInner() { + private CheckNameAvailabilityResponseBodyInner() { } /** @@ -47,17 +47,6 @@ public Boolean valid() { return this.valid; } - /** - * Set the valid property: indicates if the bot name is valid. - * - * @param valid the valid value to set. - * @return the CheckNameAvailabilityResponseBodyInner object itself. - */ - public CheckNameAvailabilityResponseBodyInner withValid(Boolean valid) { - this.valid = valid; - return this; - } - /** * Get the message property: additional message from the bot management api showing why a bot name is not available. * @@ -67,17 +56,6 @@ public String message() { return this.message; } - /** - * Set the message property: additional message from the bot management api showing why a bot name is not available. - * - * @param message the message value to set. - * @return the CheckNameAvailabilityResponseBodyInner object itself. - */ - public CheckNameAvailabilityResponseBodyInner withMessage(String message) { - this.message = message; - return this; - } - /** * Get the absCode property: response code from ABS. * @@ -87,25 +65,6 @@ public String absCode() { return this.absCode; } - /** - * Set the absCode property: response code from ABS. - * - * @param absCode the absCode value to set. - * @return the CheckNameAvailabilityResponseBodyInner object itself. - */ - public CheckNameAvailabilityResponseBodyInner withAbsCode(String absCode) { - this.absCode = absCode; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/ConnectionSettingInner.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/ConnectionSettingInner.java index 95ec8cf3ec7b..7a0fe26975c5 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/ConnectionSettingInner.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/ConnectionSettingInner.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.management.Resource; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -20,12 +21,22 @@ * Bot channel resource definition. */ @Fluent -public final class ConnectionSettingInner extends Resource { +public final class ConnectionSettingInner extends ProxyResource { /* * The set of properties specific to bot channel resource */ private ConnectionSettingProperties properties; + /* + * Specifies the location of the resource. + */ + private String location; + + /* + * Contains resource tags defined as key/value pairs. + */ + private Map tags; + /* * Gets or sets the SKU of the resource. */ @@ -37,7 +48,7 @@ public final class ConnectionSettingInner extends Resource { private Kind kind; /* - * Entity Tag + * Entity Tag. */ private String etag; @@ -46,6 +57,11 @@ public final class ConnectionSettingInner extends Resource { */ private List zones; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + /* * The type of the resource. */ @@ -87,6 +103,46 @@ public ConnectionSettingInner withProperties(ConnectionSettingProperties propert return this; } + /** + * Get the location property: Specifies the location of the resource. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: Specifies the location of the resource. + * + * @param location the location value to set. + * @return the ConnectionSettingInner object itself. + */ + public ConnectionSettingInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the tags property: Contains resource tags defined as key/value pairs. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Contains resource tags defined as key/value pairs. + * + * @param tags the tags value to set. + * @return the ConnectionSettingInner object itself. + */ + public ConnectionSettingInner withTags(Map tags) { + this.tags = tags; + return this; + } + /** * Get the sku property: Gets or sets the SKU of the resource. * @@ -156,6 +212,15 @@ public List zones() { return this.zones; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the type property: The type of the resource. * @@ -186,47 +251,15 @@ public String id() { return this.id; } - /** - * {@inheritDoc} - */ - @Override - public ConnectionSettingInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ConnectionSettingInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - if (sku() != null) { - sku().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("properties", this.properties); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("sku", this.sku); jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); jsonWriter.writeStringField("etag", this.etag); @@ -255,13 +288,13 @@ public static ConnectionSettingInner fromJson(JsonReader jsonReader) throws IOEx deserializedConnectionSettingInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedConnectionSettingInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedConnectionSettingInner.properties = ConnectionSettingProperties.fromJson(reader); } else if ("location".equals(fieldName)) { - deserializedConnectionSettingInner.withLocation(reader.getString()); + deserializedConnectionSettingInner.location = reader.getString(); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedConnectionSettingInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedConnectionSettingInner.properties = ConnectionSettingProperties.fromJson(reader); + deserializedConnectionSettingInner.tags = tags; } else if ("sku".equals(fieldName)) { deserializedConnectionSettingInner.sku = Sku.fromJson(reader); } else if ("kind".equals(fieldName)) { @@ -271,6 +304,8 @@ public static ConnectionSettingInner fromJson(JsonReader jsonReader) throws IOEx } else if ("zones".equals(fieldName)) { List zones = reader.readArray(reader1 -> reader1.getString()); deserializedConnectionSettingInner.zones = zones; + } else if ("systemData".equals(fieldName)) { + deserializedConnectionSettingInner.systemData = SystemData.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/CreateEmailSignInUrlResponseInner.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/CreateEmailSignInUrlResponseInner.java new file mode 100644 index 000000000000..3a80cf5218bd --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/CreateEmailSignInUrlResponseInner.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.botservice.models.CreateEmailSignInUrlResponseProperties; +import java.io.IOException; + +/** + * The ARM create email sign in url operation response. + */ +@Immutable +public final class CreateEmailSignInUrlResponseInner implements JsonSerializable { + /* + * Specifies the resource ID. + */ + private String id; + + /* + * Specifies the location of the resource. + */ + private String location; + + /* + * The set of properties specific to sign in url + */ + private CreateEmailSignInUrlResponseProperties properties; + + /** + * Creates an instance of CreateEmailSignInUrlResponseInner class. + */ + private CreateEmailSignInUrlResponseInner() { + } + + /** + * Get the id property: Specifies the resource ID. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the location property: Specifies the location of the resource. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Get the properties property: The set of properties specific to sign in url. + * + * @return the properties value. + */ + public CreateEmailSignInUrlResponseProperties properties() { + return this.properties; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("location", this.location); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CreateEmailSignInUrlResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CreateEmailSignInUrlResponseInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the CreateEmailSignInUrlResponseInner. + */ + public static CreateEmailSignInUrlResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CreateEmailSignInUrlResponseInner deserializedCreateEmailSignInUrlResponseInner + = new CreateEmailSignInUrlResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedCreateEmailSignInUrlResponseInner.id = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedCreateEmailSignInUrlResponseInner.location = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedCreateEmailSignInUrlResponseInner.properties + = CreateEmailSignInUrlResponseProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedCreateEmailSignInUrlResponseInner; + }); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/HostSettingsResponseInner.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/HostSettingsResponseInner.java index 7de930168786..72ab80decaef 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/HostSettingsResponseInner.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/HostSettingsResponseInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * The response body returned for a request to Bot Service Management to check per subscription hostSettings. */ -@Fluent +@Immutable public final class HostSettingsResponseInner implements JsonSerializable { /* * For in-conversation bot user authentication @@ -52,14 +52,14 @@ public final class HostSettingsResponseInner implements JsonSerializable tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (resource() != null) { - resource().validate(); - } - if (setting() != null) { - setting().validate(); - } - if (properties() != null) { - properties().validate(); - } - if (sku() != null) { - sku().validate(); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", properties()); jsonWriter.writeStringField("location", location()); jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", properties()); jsonWriter.writeJsonField("sku", sku()); jsonWriter.writeStringField("kind", kind() == null ? null : kind().toString()); jsonWriter.writeStringField("etag", etag()); @@ -330,13 +216,13 @@ public static ListChannelWithKeysResponseInner fromJson(JsonReader jsonReader) t deserializedListChannelWithKeysResponseInner.name = reader.getString(); } else if ("type".equals(fieldName)) { deserializedListChannelWithKeysResponseInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedListChannelWithKeysResponseInner.withProperties(Channel.fromJson(reader)); } else if ("location".equals(fieldName)) { deserializedListChannelWithKeysResponseInner.withLocation(reader.getString()); } else if ("tags".equals(fieldName)) { Map tags = reader.readMap(reader1 -> reader1.getString()); deserializedListChannelWithKeysResponseInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedListChannelWithKeysResponseInner.withProperties(Channel.fromJson(reader)); } else if ("sku".equals(fieldName)) { deserializedListChannelWithKeysResponseInner.withSku(Sku.fromJson(reader)); } else if ("kind".equals(fieldName)) { @@ -346,6 +232,8 @@ public static ListChannelWithKeysResponseInner fromJson(JsonReader jsonReader) t } else if ("zones".equals(fieldName)) { List zones = reader.readArray(reader1 -> reader1.getString()); deserializedListChannelWithKeysResponseInner.zones = zones; + } else if ("systemData".equals(fieldName)) { + deserializedListChannelWithKeysResponseInner.systemData = SystemData.fromJson(reader); } else if ("resource".equals(fieldName)) { deserializedListChannelWithKeysResponseInner.resource = Channel.fromJson(reader); } else if ("setting".equals(fieldName)) { diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/NetworkSecurityPerimeterConfigurationInner.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/NetworkSecurityPerimeterConfigurationInner.java new file mode 100644 index 000000000000..79aa9223c284 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/NetworkSecurityPerimeterConfigurationInner.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.botservice.models.NetworkSecurityPerimeterConfigurationProperties; +import java.io.IOException; + +/** + * Network Security Perimeter configuration. + */ +@Immutable +public final class NetworkSecurityPerimeterConfigurationInner extends ProxyResource { + /* + * Properties of the Network Security Perimeter configuration + */ + private NetworkSecurityPerimeterConfigurationProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of NetworkSecurityPerimeterConfigurationInner class. + */ + private NetworkSecurityPerimeterConfigurationInner() { + } + + /** + * Get the properties property: Properties of the Network Security Perimeter configuration. + * + * @return the properties value. + */ + public NetworkSecurityPerimeterConfigurationProperties properties() { + return this.properties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.properties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkSecurityPerimeterConfigurationInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkSecurityPerimeterConfigurationInner if the JsonReader was pointing to an instance + * of it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkSecurityPerimeterConfigurationInner. + */ + public static NetworkSecurityPerimeterConfigurationInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkSecurityPerimeterConfigurationInner deserializedNetworkSecurityPerimeterConfigurationInner + = new NetworkSecurityPerimeterConfigurationInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedNetworkSecurityPerimeterConfigurationInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedNetworkSecurityPerimeterConfigurationInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedNetworkSecurityPerimeterConfigurationInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedNetworkSecurityPerimeterConfigurationInner.properties + = NetworkSecurityPerimeterConfigurationProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedNetworkSecurityPerimeterConfigurationInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkSecurityPerimeterConfigurationInner; + }); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/OperationEntityInner.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/OperationEntityInner.java index c59c414d0e67..96cb6dd9ca07 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/OperationEntityInner.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/OperationEntityInner.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.util.BinaryData; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +16,7 @@ /** * The operations supported by Bot Service Management. */ -@Fluent +@Immutable public final class OperationEntityInner implements JsonSerializable { /* * Operation name: {provider}/{resource}/{operation}. @@ -35,12 +36,12 @@ public final class OperationEntityInner implements JsonSerializable BinaryData.fromObject(nonNullReader.readUntyped())); } else { reader.skipChildren(); } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/OperationResultsDescriptionInner.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/OperationResultsDescriptionInner.java new file mode 100644 index 000000000000..56f4611f2d0e --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/OperationResultsDescriptionInner.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.CoreUtils; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.botservice.models.OperationResultStatus; +import java.io.IOException; +import java.time.OffsetDateTime; + +/** + * The properties indicating the operation result of an operation on a service. + */ +@Immutable +public final class OperationResultsDescriptionInner implements JsonSerializable { + /* + * The ID of the operation returned. + */ + private String id; + + /* + * The name of the operation result. + */ + private String name; + + /* + * The status of the operation being performed. + */ + private OperationResultStatus status; + + /* + * The time that the operation was started. + */ + private OffsetDateTime startTime; + + /** + * Creates an instance of OperationResultsDescriptionInner class. + */ + private OperationResultsDescriptionInner() { + } + + /** + * Get the id property: The ID of the operation returned. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: The name of the operation result. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the status property: The status of the operation being performed. + * + * @return the status value. + */ + public OperationResultStatus status() { + return this.status; + } + + /** + * Get the startTime property: The time that the operation was started. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of OperationResultsDescriptionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of OperationResultsDescriptionInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the OperationResultsDescriptionInner. + */ + public static OperationResultsDescriptionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + OperationResultsDescriptionInner deserializedOperationResultsDescriptionInner + = new OperationResultsDescriptionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedOperationResultsDescriptionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedOperationResultsDescriptionInner.name = reader.getString(); + } else if ("status".equals(fieldName)) { + deserializedOperationResultsDescriptionInner.status + = OperationResultStatus.fromString(reader.getString()); + } else if ("startTime".equals(fieldName)) { + deserializedOperationResultsDescriptionInner.startTime = reader + .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + } else { + reader.skipChildren(); + } + } + + return deserializedOperationResultsDescriptionInner; + }); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/PrivateEndpointConnectionInner.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/PrivateEndpointConnectionInner.java new file mode 100644 index 000000000000..b91eaabadb4e --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/PrivateEndpointConnectionInner.java @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.botservice.models.PrivateEndpoint; +import com.azure.resourcemanager.botservice.models.PrivateEndpointConnectionProvisioningState; +import com.azure.resourcemanager.botservice.models.PrivateLinkServiceConnectionState; +import java.io.IOException; +import java.util.List; + +/** + * The Private Endpoint Connection resource. + */ +@Fluent +public final class PrivateEndpointConnectionInner extends ProxyResource { + /* + * Resource properties. + */ + private PrivateEndpointConnectionProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + private SystemData systemData; + + /* + * The type of the resource. + */ + private String type; + + /* + * The name of the resource. + */ + private String name; + + /* + * Fully qualified resource Id for the resource. + */ + private String id; + + /** + * Creates an instance of PrivateEndpointConnectionInner class. + */ + public PrivateEndpointConnectionInner() { + } + + /** + * Get the innerProperties property: Resource properties. + * + * @return the innerProperties value. + */ + private PrivateEndpointConnectionProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the type property: The type of the resource. + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the privateEndpoint property: The resource of private end point. + * + * @return the privateEndpoint value. + */ + public PrivateEndpoint privateEndpoint() { + return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint(); + } + + /** + * Set the privateEndpoint property: The resource of private end point. + * + * @param privateEndpoint the privateEndpoint value to set. + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateEndpointConnectionProperties(); + } + this.innerProperties().withPrivateEndpoint(privateEndpoint); + return this; + } + + /** + * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @return the privateLinkServiceConnectionState value. + */ + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState(); + } + + /** + * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner + withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateEndpointConnectionProperties(); + } + this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the private endpoint connection resource. + * + * @return the provisioningState value. + */ + public PrivateEndpointConnectionProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the groupIds property: Group ids. + * + * @return the groupIds value. + */ + public List groupIds() { + return this.innerProperties() == null ? null : this.innerProperties().groupIds(); + } + + /** + * Set the groupIds property: Group ids. + * + * @param groupIds the groupIds value to set. + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner withGroupIds(List groupIds) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateEndpointConnectionProperties(); + } + this.innerProperties().withGroupIds(groupIds); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateEndpointConnectionInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateEndpointConnectionInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PrivateEndpointConnectionInner. + */ + public static PrivateEndpointConnectionInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateEndpointConnectionInner deserializedPrivateEndpointConnectionInner + = new PrivateEndpointConnectionInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.innerProperties + = PrivateEndpointConnectionProperties.fromJson(reader); + } else if ("systemData".equals(fieldName)) { + deserializedPrivateEndpointConnectionInner.systemData = SystemData.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateEndpointConnectionInner; + }); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/PrivateEndpointConnectionProperties.java new file mode 100644 index 000000000000..8ae18f7de786 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/PrivateEndpointConnectionProperties.java @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.botservice.models.PrivateEndpoint; +import com.azure.resourcemanager.botservice.models.PrivateEndpointConnectionProvisioningState; +import com.azure.resourcemanager.botservice.models.PrivateLinkServiceConnectionState; +import java.io.IOException; +import java.util.List; + +/** + * Properties of the PrivateEndpointConnectProperties. + */ +@Fluent +public final class PrivateEndpointConnectionProperties + implements JsonSerializable { + /* + * The resource of private end point. + */ + private PrivateEndpoint privateEndpoint; + + /* + * A collection of information about the state of the connection between service consumer and provider. + */ + private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; + + /* + * The provisioning state of the private endpoint connection resource. + */ + private PrivateEndpointConnectionProvisioningState provisioningState; + + /* + * Group ids + */ + private List groupIds; + + /** + * Creates an instance of PrivateEndpointConnectionProperties class. + */ + public PrivateEndpointConnectionProperties() { + } + + /** + * Get the privateEndpoint property: The resource of private end point. + * + * @return the privateEndpoint value. + */ + public PrivateEndpoint privateEndpoint() { + return this.privateEndpoint; + } + + /** + * Set the privateEndpoint property: The resource of private end point. + * + * @param privateEndpoint the privateEndpoint value to set. + * @return the PrivateEndpointConnectionProperties object itself. + */ + public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + this.privateEndpoint = privateEndpoint; + return this; + } + + /** + * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @return the privateLinkServiceConnectionState value. + */ + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.privateLinkServiceConnectionState; + } + + /** + * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. + * @return the PrivateEndpointConnectionProperties object itself. + */ + public PrivateEndpointConnectionProperties + withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the private endpoint connection resource. + * + * @return the provisioningState value. + */ + public PrivateEndpointConnectionProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the groupIds property: Group ids. + * + * @return the groupIds value. + */ + public List groupIds() { + return this.groupIds; + } + + /** + * Set the groupIds property: Group ids. + * + * @param groupIds the groupIds value to set. + * @return the PrivateEndpointConnectionProperties object itself. + */ + public PrivateEndpointConnectionProperties withGroupIds(List groupIds) { + this.groupIds = groupIds; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("privateLinkServiceConnectionState", this.privateLinkServiceConnectionState); + jsonWriter.writeJsonField("privateEndpoint", this.privateEndpoint); + jsonWriter.writeArrayField("groupIds", this.groupIds, (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateEndpointConnectionProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateEndpointConnectionProperties if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the PrivateEndpointConnectionProperties. + */ + public static PrivateEndpointConnectionProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateEndpointConnectionProperties deserializedPrivateEndpointConnectionProperties + = new PrivateEndpointConnectionProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("privateLinkServiceConnectionState".equals(fieldName)) { + deserializedPrivateEndpointConnectionProperties.privateLinkServiceConnectionState + = PrivateLinkServiceConnectionState.fromJson(reader); + } else if ("privateEndpoint".equals(fieldName)) { + deserializedPrivateEndpointConnectionProperties.privateEndpoint = PrivateEndpoint.fromJson(reader); + } else if ("provisioningState".equals(fieldName)) { + deserializedPrivateEndpointConnectionProperties.provisioningState + = PrivateEndpointConnectionProvisioningState.fromString(reader.getString()); + } else if ("groupIds".equals(fieldName)) { + List groupIds = reader.readArray(reader1 -> reader1.getString()); + deserializedPrivateEndpointConnectionProperties.groupIds = groupIds; + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateEndpointConnectionProperties; + }); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/PrivateLinkResourceListResultInner.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/PrivateLinkResourceListResultInner.java new file mode 100644 index 000000000000..615e0a48dff2 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/PrivateLinkResourceListResultInner.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.botservice.models.PrivateLinkResource; +import java.io.IOException; +import java.util.List; + +/** + * A list of private link resources. + */ +@Immutable +public final class PrivateLinkResourceListResultInner implements JsonSerializable { + /* + * Array of private link resources + */ + private List value; + + /** + * Creates an instance of PrivateLinkResourceListResultInner class. + */ + private PrivateLinkResourceListResultInner() { + } + + /** + * Get the value property: Array of private link resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateLinkResourceListResultInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateLinkResourceListResultInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PrivateLinkResourceListResultInner. + */ + public static PrivateLinkResourceListResultInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateLinkResourceListResultInner deserializedPrivateLinkResourceListResultInner + = new PrivateLinkResourceListResultInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> PrivateLinkResource.fromJson(reader1)); + deserializedPrivateLinkResourceListResultInner.value = value; + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateLinkResourceListResultInner; + }); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/PrivateLinkResourceProperties.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/PrivateLinkResourceProperties.java new file mode 100644 index 000000000000..ac6c89fc2358 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/PrivateLinkResourceProperties.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Properties of a private link resource. + */ +@Immutable +public final class PrivateLinkResourceProperties implements JsonSerializable { + /* + * The private link resource group id. + */ + private String groupId; + + /* + * The private link resource required member names. + */ + private List requiredMembers; + + /* + * The private link resource Private link DNS zone name. + */ + private List requiredZoneNames; + + /** + * Creates an instance of PrivateLinkResourceProperties class. + */ + private PrivateLinkResourceProperties() { + } + + /** + * Get the groupId property: The private link resource group id. + * + * @return the groupId value. + */ + public String groupId() { + return this.groupId; + } + + /** + * Get the requiredMembers property: The private link resource required member names. + * + * @return the requiredMembers value. + */ + public List requiredMembers() { + return this.requiredMembers; + } + + /** + * Get the requiredZoneNames property: The private link resource Private link DNS zone name. + * + * @return the requiredZoneNames value. + */ + public List requiredZoneNames() { + return this.requiredZoneNames; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("requiredZoneNames", this.requiredZoneNames, + (writer, element) -> writer.writeString(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateLinkResourceProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateLinkResourceProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PrivateLinkResourceProperties. + */ + public static PrivateLinkResourceProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateLinkResourceProperties deserializedPrivateLinkResourceProperties + = new PrivateLinkResourceProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("groupId".equals(fieldName)) { + deserializedPrivateLinkResourceProperties.groupId = reader.getString(); + } else if ("requiredMembers".equals(fieldName)) { + List requiredMembers = reader.readArray(reader1 -> reader1.getString()); + deserializedPrivateLinkResourceProperties.requiredMembers = requiredMembers; + } else if ("requiredZoneNames".equals(fieldName)) { + List requiredZoneNames = reader.readArray(reader1 -> reader1.getString()); + deserializedPrivateLinkResourceProperties.requiredZoneNames = requiredZoneNames; + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateLinkResourceProperties; + }); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/QnAMakerEndpointKeysResponseInner.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/QnAMakerEndpointKeysResponseInner.java new file mode 100644 index 000000000000..0391234df2ce --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/QnAMakerEndpointKeysResponseInner.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Schema for EndpointKeys generate/refresh operations. + */ +@Immutable +public final class QnAMakerEndpointKeysResponseInner implements JsonSerializable { + /* + * Primary Access Key. + */ + private String primaryEndpointKey; + + /* + * Secondary Access Key. + */ + private String secondaryEndpointKey; + + /* + * Current version of runtime. + */ + private String installedVersion; + + /* + * Latest version of runtime. + */ + private String lastStableVersion; + + /** + * Creates an instance of QnAMakerEndpointKeysResponseInner class. + */ + private QnAMakerEndpointKeysResponseInner() { + } + + /** + * Get the primaryEndpointKey property: Primary Access Key. + * + * @return the primaryEndpointKey value. + */ + public String primaryEndpointKey() { + return this.primaryEndpointKey; + } + + /** + * Get the secondaryEndpointKey property: Secondary Access Key. + * + * @return the secondaryEndpointKey value. + */ + public String secondaryEndpointKey() { + return this.secondaryEndpointKey; + } + + /** + * Get the installedVersion property: Current version of runtime. + * + * @return the installedVersion value. + */ + public String installedVersion() { + return this.installedVersion; + } + + /** + * Get the lastStableVersion property: Latest version of runtime. + * + * @return the lastStableVersion value. + */ + public String lastStableVersion() { + return this.lastStableVersion; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("primaryEndpointKey", this.primaryEndpointKey); + jsonWriter.writeStringField("secondaryEndpointKey", this.secondaryEndpointKey); + jsonWriter.writeStringField("installedVersion", this.installedVersion); + jsonWriter.writeStringField("lastStableVersion", this.lastStableVersion); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of QnAMakerEndpointKeysResponseInner from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of QnAMakerEndpointKeysResponseInner if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the QnAMakerEndpointKeysResponseInner. + */ + public static QnAMakerEndpointKeysResponseInner fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + QnAMakerEndpointKeysResponseInner deserializedQnAMakerEndpointKeysResponseInner + = new QnAMakerEndpointKeysResponseInner(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("primaryEndpointKey".equals(fieldName)) { + deserializedQnAMakerEndpointKeysResponseInner.primaryEndpointKey = reader.getString(); + } else if ("secondaryEndpointKey".equals(fieldName)) { + deserializedQnAMakerEndpointKeysResponseInner.secondaryEndpointKey = reader.getString(); + } else if ("installedVersion".equals(fieldName)) { + deserializedQnAMakerEndpointKeysResponseInner.installedVersion = reader.getString(); + } else if ("lastStableVersion".equals(fieldName)) { + deserializedQnAMakerEndpointKeysResponseInner.lastStableVersion = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedQnAMakerEndpointKeysResponseInner; + }); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/ServiceProviderResponseListInner.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/ServiceProviderResponseListInner.java index d69054b715e5..3bc56f67e903 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/ServiceProviderResponseListInner.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/ServiceProviderResponseListInner.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * The list of bot service providers response. */ -@Fluent +@Immutable public final class ServiceProviderResponseListInner implements JsonSerializable { /* * The link used to get the next page of bot service providers. @@ -31,7 +31,7 @@ public final class ServiceProviderResponseListInner implements JsonSerializable< /** * Creates an instance of ServiceProviderResponseListInner class. */ - public ServiceProviderResponseListInner() { + private ServiceProviderResponseListInner() { } /** @@ -43,17 +43,6 @@ public String nextLink() { return this.nextLink; } - /** - * Set the nextLink property: The link used to get the next page of bot service providers. - * - * @param nextLink the nextLink value to set. - * @return the ServiceProviderResponseListInner object itself. - */ - public ServiceProviderResponseListInner withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - /** * Get the value property: Gets the list of bot service providers and their properties. * @@ -63,17 +52,6 @@ public List value() { return this.value; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/package-info.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/package-info.java index f08ab2678a6b..5155da5d83da 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/package-info.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the inner data models for AzureBotService. + * Package containing the inner data models for BotService. * Azure Bot Service is a platform for creating smart conversational agents. */ package com.azure.resourcemanager.botservice.fluent.models; diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/package-info.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/package-info.java index c582d5a43a0c..516bbe0ee7ce 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/package-info.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/fluent/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the service clients for AzureBotService. + * Package containing the service clients for BotService. * Azure Bot Service is a platform for creating smart conversational agents. */ package com.azure.resourcemanager.botservice.fluent; diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/BotChannelImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/BotChannelImpl.java index c5827a308d90..861431efce05 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/BotChannelImpl.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/BotChannelImpl.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.botservice.fluent.models.BotChannelInner; import com.azure.resourcemanager.botservice.models.BotChannel; import com.azure.resourcemanager.botservice.models.Channel; @@ -35,6 +36,10 @@ public String type() { return this.innerModel().type(); } + public Channel properties() { + return this.innerModel().properties(); + } + public String location() { return this.innerModel().location(); } @@ -48,10 +53,6 @@ public Map tags() { } } - public Channel properties() { - return this.innerModel().properties(); - } - public Sku sku() { return this.innerModel().sku(); } @@ -73,6 +74,10 @@ public List zones() { } } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public BotChannelInner innerModel() { return this.innerObject; } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/BotConnectionsClientImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/BotConnectionsClientImpl.java index 7df0d5c23e64..26348544323f 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/BotConnectionsClientImpl.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/BotConnectionsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.implementation; @@ -33,7 +33,7 @@ import com.azure.resourcemanager.botservice.fluent.BotConnectionsClient; import com.azure.resourcemanager.botservice.fluent.models.ConnectionSettingInner; import com.azure.resourcemanager.botservice.fluent.models.ServiceProviderResponseListInner; -import com.azure.resourcemanager.botservice.models.ConnectionSettingResponseList; +import com.azure.resourcemanager.botservice.implementation.models.ConnectionSettingResponseList; import reactor.core.publisher.Mono; /** @@ -48,194 +48,175 @@ public final class BotConnectionsClientImpl implements BotConnectionsClient { /** * The service client containing this operation class. */ - private final AzureBotServiceImpl client; + private final BotServiceManagementClientImpl client; /** * Initializes an instance of BotConnectionsClientImpl. * * @param client the instance of the service client containing this operation class. */ - BotConnectionsClientImpl(AzureBotServiceImpl client) { + BotConnectionsClientImpl(BotServiceManagementClientImpl client) { this.service = RestProxy.create(BotConnectionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureBotServiceBotConnections to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for BotServiceManagementClientBotConnections to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureBotServiceBotCo") + @Host("{endpoint}") + @ServiceInterface(name = "BotServiceManagementClientBotConnections") public interface BotConnectionsService { @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.BotService/listAuthServiceProviders") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/connections/{connectionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listServiceProviders(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("connectionName") String connectionName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/connections/{connectionName}/listWithSecrets") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/connections/{connectionName}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listWithSecrets(@HostParam("$host") String endpoint, + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("connectionName") String connectionName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + @PathParam("connectionName") String connectionName, @HeaderParam("Accept") String accept, Context context); - @Headers({ "Content-Type: application/json" }) @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/connections/{connectionName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create(@HostParam("$host") String endpoint, + Mono> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("connectionName") String connectionName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") ConnectionSettingInner parameters, @HeaderParam("Accept") String accept, + @PathParam("connectionName") String connectionName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ConnectionSettingInner parameters, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/connections/{connectionName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("connectionName") String connectionName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ConnectionSettingInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/connections/{connectionName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, + Mono> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("connectionName") String connectionName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") ConnectionSettingInner parameters, @HeaderParam("Accept") String accept, + @PathParam("connectionName") String connectionName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ConnectionSettingInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/connections/{connectionName}") - @ExpectedResponses({ 200 }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/connections/{connectionName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("connectionName") String connectionName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + @PathParam("connectionName") String connectionName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") ConnectionSettingInner parameters, + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/connections/{connectionName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("connectionName") String connectionName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/connections/{connectionName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("connectionName") String connectionName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + @PathParam("connectionName") String connectionName, Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/connections") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByBotService(@HostParam("$host") String endpoint, + Mono> listByBotService(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/connections") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByBotServiceNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + Response listByBotServiceSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, @HeaderParam("Accept") String accept, Context context); - } - /** - * Lists the available Service Providers for creating Connection Settings. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service providers response along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listServiceProvidersWithResponseAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listServiceProviders(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/connections/{connectionName}/listWithSecrets") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listWithSecrets(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("connectionName") String connectionName, @HeaderParam("Accept") String accept, Context context); - /** - * Lists the available Service Providers for creating Connection Settings. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service providers response along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listServiceProvidersWithResponseAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listServiceProviders(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context); - } + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/connections/{connectionName}/listWithSecrets") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listWithSecretsSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("connectionName") String connectionName, @HeaderParam("Accept") String accept, Context context); - /** - * Lists the available Service Providers for creating Connection Settings. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service providers response on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listServiceProvidersAsync() { - return listServiceProvidersWithResponseAsync().flatMap(res -> Mono.justOrEmpty(res.getValue())); - } + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.BotService/listAuthServiceProviders") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listServiceProviders(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - /** - * Lists the available Service Providers for creating Connection Settings. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service providers response along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listServiceProvidersWithResponse(Context context) { - return listServiceProvidersWithResponseAsync(context).block(); - } + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.BotService/listAuthServiceProviders") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listServiceProvidersSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); - /** - * Lists the available Service Providers for creating Connection Settings. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service providers response. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ServiceProviderResponseListInner listServiceProviders() { - return listServiceProvidersWithResponse(Context.NONE).getValue(); + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByBotServiceNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByBotServiceNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Get a Connection Setting registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param connectionName The name of the Bot Service Connection Setting resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -245,77 +226,19 @@ public ServiceProviderResponseListInner listServiceProviders() { * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithSecretsWithResponseAsync(String resourceGroupName, - String resourceName, String connectionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String connectionName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listWithSecrets(this.client.getEndpoint(), resourceGroupName, resourceName, - connectionName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, connectionName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a Connection Setting registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Connection Setting registration for a Bot Service along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithSecretsWithResponseAsync(String resourceGroupName, - String resourceName, String connectionName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listWithSecrets(this.client.getEndpoint(), resourceGroupName, resourceName, connectionName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); - } - - /** - * Get a Connection Setting registration for a Bot Service. - * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param connectionName The name of the Bot Service Connection Setting resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -324,16 +247,16 @@ private Mono> listWithSecretsWithResponseAsync( * @return a Connection Setting registration for a Bot Service on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listWithSecretsAsync(String resourceGroupName, String resourceName, + private Mono getAsync(String resourceGroupName, String resourceName, String connectionName) { - return listWithSecretsWithResponseAsync(resourceGroupName, resourceName, connectionName) + return getWithResponseAsync(resourceGroupName, resourceName, connectionName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get a Connection Setting registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param connectionName The name of the Bot Service Connection Setting resource. * @param context The context to associate with this operation. @@ -343,15 +266,17 @@ private Mono listWithSecretsAsync(String resourceGroupNa * @return a Connection Setting registration for a Bot Service along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithSecretsWithResponse(String resourceGroupName, String resourceName, + public Response getWithResponse(String resourceGroupName, String resourceName, String connectionName, Context context) { - return listWithSecretsWithResponseAsync(resourceGroupName, resourceName, connectionName, context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, connectionName, accept, context); } /** * Get a Connection Setting registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param connectionName The name of the Bot Service Connection Setting resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -360,15 +285,14 @@ public Response listWithSecretsWithResponse(String resou * @return a Connection Setting registration for a Bot Service. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ConnectionSettingInner listWithSecrets(String resourceGroupName, String resourceName, - String connectionName) { - return listWithSecretsWithResponse(resourceGroupName, resourceName, connectionName, Context.NONE).getValue(); + public ConnectionSettingInner get(String resourceGroupName, String resourceName, String connectionName) { + return getWithResponse(resourceGroupName, resourceName, connectionName, Context.NONE).getValue(); } /** * Register a new Auth Connection for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param connectionName The name of the Bot Service Connection Setting resource. * @param parameters The parameters to provide for creating the Connection Setting. @@ -380,86 +304,19 @@ public ConnectionSettingInner listWithSecrets(String resourceGroupName, String r @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createWithResponseAsync(String resourceGroupName, String resourceName, String connectionName, ConnectionSettingInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.create(this.client.getEndpoint(), resourceGroupName, resourceName, connectionName, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context)) + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, connectionName, contentType, accept, + parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Register a new Auth Connection for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource. - * @param parameters The parameters to provide for creating the Connection Setting. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bot channel resource definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync(String resourceGroupName, - String resourceName, String connectionName, ConnectionSettingInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), resourceGroupName, resourceName, connectionName, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context); - } - - /** - * Register a new Auth Connection for a Bot Service. - * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param connectionName The name of the Bot Service Connection Setting resource. * @param parameters The parameters to provide for creating the Connection Setting. @@ -478,7 +335,7 @@ private Mono createAsync(String resourceGroupName, Strin /** * Register a new Auth Connection for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param connectionName The name of the Bot Service Connection Setting resource. * @param parameters The parameters to provide for creating the Connection Setting. @@ -491,13 +348,17 @@ private Mono createAsync(String resourceGroupName, Strin @ServiceMethod(returns = ReturnType.SINGLE) public Response createWithResponse(String resourceGroupName, String resourceName, String connectionName, ConnectionSettingInner parameters, Context context) { - return createWithResponseAsync(resourceGroupName, resourceName, connectionName, parameters, context).block(); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, connectionName, contentType, accept, + parameters, context); } /** * Register a new Auth Connection for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param connectionName The name of the Bot Service Connection Setting resource. * @param parameters The parameters to provide for creating the Connection Setting. @@ -515,7 +376,7 @@ public ConnectionSettingInner create(String resourceGroupName, String resourceNa /** * Updates a Connection Setting registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param connectionName The name of the Bot Service Connection Setting resource. * @param parameters The parameters to provide for updating the Connection Setting. @@ -527,86 +388,19 @@ public ConnectionSettingInner create(String resourceGroupName, String resourceNa @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync(String resourceGroupName, String resourceName, String connectionName, ConnectionSettingInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), resourceGroupName, resourceName, connectionName, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, connectionName, contentType, accept, + parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates a Connection Setting registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource. - * @param parameters The parameters to provide for updating the Connection Setting. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bot channel resource definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, - String resourceName, String connectionName, ConnectionSettingInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), resourceGroupName, resourceName, connectionName, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context); - } - - /** - * Updates a Connection Setting registration for a Bot Service. - * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param connectionName The name of the Bot Service Connection Setting resource. * @param parameters The parameters to provide for updating the Connection Setting. @@ -625,7 +419,7 @@ private Mono updateAsync(String resourceGroupName, Strin /** * Updates a Connection Setting registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param connectionName The name of the Bot Service Connection Setting resource. * @param parameters The parameters to provide for updating the Connection Setting. @@ -638,13 +432,17 @@ private Mono updateAsync(String resourceGroupName, Strin @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse(String resourceGroupName, String resourceName, String connectionName, ConnectionSettingInner parameters, Context context) { - return updateWithResponseAsync(resourceGroupName, resourceName, connectionName, parameters, context).block(); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, connectionName, contentType, accept, + parameters, context); } /** * Updates a Connection Setting registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param connectionName The name of the Bot Service Connection Setting resource. * @param parameters The parameters to provide for updating the Connection Setting. @@ -660,406 +458,324 @@ public ConnectionSettingInner update(String resourceGroupName, String resourceNa } /** - * Get a Connection Setting registration for a Bot Service. + * Deletes a Connection Setting registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param connectionName The name of the Bot Service Connection Setting resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Connection Setting registration for a Bot Service along with {@link Response} on successful completion - * of {@link Mono}. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName, String connectionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, resourceName, - connectionName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, connectionName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Get a Connection Setting registration for a Bot Service. + * Deletes a Connection Setting registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param connectionName The name of the Bot Service Connection Setting resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Connection Setting registration for a Bot Service along with {@link Response} on successful completion - * of {@link Mono}. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String resourceName, - String connectionName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), resourceGroupName, resourceName, connectionName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + private Mono deleteAsync(String resourceGroupName, String resourceName, String connectionName) { + return deleteWithResponseAsync(resourceGroupName, resourceName, connectionName) + .flatMap(ignored -> Mono.empty()); } /** - * Get a Connection Setting registration for a Bot Service. + * Deletes a Connection Setting registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param connectionName The name of the Bot Service Connection Setting resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Connection Setting registration for a Bot Service on successful completion of {@link Mono}. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String resourceName, - String connectionName) { - return getWithResponseAsync(resourceGroupName, resourceName, connectionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Response deleteWithResponse(String resourceGroupName, String resourceName, String connectionName, + Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, connectionName, context); } /** - * Get a Connection Setting registration for a Bot Service. + * Deletes a Connection Setting registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param connectionName The name of the Bot Service Connection Setting resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Connection Setting registration for a Bot Service along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String resourceName, - String connectionName, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, connectionName, context).block(); + public void delete(String resourceGroupName, String resourceName, String connectionName) { + deleteWithResponse(resourceGroupName, resourceName, connectionName, Context.NONE); } /** - * Get a Connection Setting registration for a Bot Service. + * Returns all the Connection Settings registered to a particular BotService resource. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Connection Setting registration for a Bot Service. + * @return the list of bot service connection settings response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ConnectionSettingInner get(String resourceGroupName, String resourceName, String connectionName) { - return getWithResponse(resourceGroupName, resourceName, connectionName, Context.NONE).getValue(); + private Mono> listByBotServiceSinglePageAsync(String resourceGroupName, + String resourceName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByBotService(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Deletes a Connection Setting registration for a Bot Service. + * Returns all the Connection Settings registered to a particular BotService resource. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the list of bot service connection settings response as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByBotServiceAsync(String resourceGroupName, String resourceName) { + return new PagedFlux<>(() -> listByBotServiceSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listByBotServiceNextSinglePageAsync(nextLink)); + } + + /** + * Returns all the Connection Settings registered to a particular BotService resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of bot service connection settings response along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String connectionName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private PagedResponse listByBotServiceSinglePage(String resourceGroupName, + String resourceName) { final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, resourceName, - connectionName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listByBotServiceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Deletes a Connection Setting registration for a Bot Service. + * Returns all the Connection Settings registered to a particular BotService resource. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return the list of bot service connection settings response along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String connectionName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (connectionName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectionName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private PagedResponse listByBotServiceSinglePage(String resourceGroupName, + String resourceName, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, resourceName, connectionName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + Response res + = service.listByBotServiceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Deletes a Connection Setting registration for a Bot Service. + * Returns all the Connection Settings registered to a particular BotService resource. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return the list of bot service connection settings response as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String resourceName, String connectionName) { - return deleteWithResponseAsync(resourceGroupName, resourceName, connectionName) - .flatMap(ignored -> Mono.empty()); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByBotService(String resourceGroupName, String resourceName) { + return new PagedIterable<>(() -> listByBotServiceSinglePage(resourceGroupName, resourceName), + nextLink -> listByBotServiceNextSinglePage(nextLink)); } /** - * Deletes a Connection Setting registration for a Bot Service. + * Returns all the Connection Settings registered to a particular BotService resource. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return the list of bot service connection settings response as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String resourceName, String connectionName, + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByBotService(String resourceGroupName, String resourceName, Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, connectionName, context).block(); + return new PagedIterable<>(() -> listByBotServiceSinglePage(resourceGroupName, resourceName, context), + nextLink -> listByBotServiceNextSinglePage(nextLink, context)); } /** - * Deletes a Connection Setting registration for a Bot Service. + * Get a Connection Setting registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param connectionName The name of the Bot Service Connection Setting resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Connection Setting registration for a Bot Service along with {@link Response} on successful completion + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String resourceName, String connectionName) { - deleteWithResponse(resourceGroupName, resourceName, connectionName, Context.NONE); + private Mono> listWithSecretsWithResponseAsync(String resourceGroupName, + String resourceName, String connectionName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listWithSecrets(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, connectionName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Returns all the Connection Settings registered to a particular BotService resource. + * Get a Connection Setting registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. + * @param connectionName The name of the Bot Service Connection Setting resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service connection settings response along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a Connection Setting registration for a Bot Service on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByBotServiceSinglePageAsync(String resourceGroupName, - String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByBotService(this.client.getEndpoint(), resourceGroupName, resourceName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + private Mono listWithSecretsAsync(String resourceGroupName, String resourceName, + String connectionName) { + return listWithSecretsWithResponseAsync(resourceGroupName, resourceName, connectionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Returns all the Connection Settings registered to a particular BotService resource. + * Get a Connection Setting registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. + * @param connectionName The name of the Bot Service Connection Setting resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service connection settings response along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return a Connection Setting registration for a Bot Service along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByBotServiceSinglePageAsync(String resourceGroupName, - String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + public Response listWithSecretsWithResponse(String resourceGroupName, String resourceName, + String connectionName, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByBotService(this.client.getEndpoint(), resourceGroupName, resourceName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + return service.listWithSecretsSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, connectionName, accept, context); } /** - * Returns all the Connection Settings registered to a particular BotService resource. + * Get a Connection Setting registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. + * @param connectionName The name of the Bot Service Connection Setting resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service connection settings response as paginated response with {@link PagedFlux}. + * @return a Connection Setting registration for a Bot Service. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByBotServiceAsync(String resourceGroupName, String resourceName) { - return new PagedFlux<>(() -> listByBotServiceSinglePageAsync(resourceGroupName, resourceName), - nextLink -> listByBotServiceNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + public ConnectionSettingInner listWithSecrets(String resourceGroupName, String resourceName, + String connectionName) { + return listWithSecretsWithResponse(resourceGroupName, resourceName, connectionName, Context.NONE).getValue(); } /** - * Returns all the Connection Settings registered to a particular BotService resource. + * Lists the available Service Providers for creating Connection Settings. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service connection settings response as paginated response with {@link PagedFlux}. + * @return the list of bot service providers response along with {@link Response} on successful completion of + * {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByBotServiceAsync(String resourceGroupName, String resourceName, - Context context) { - return new PagedFlux<>(() -> listByBotServiceSinglePageAsync(resourceGroupName, resourceName, context), - nextLink -> listByBotServiceNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listServiceProvidersWithResponseAsync() { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listServiceProviders(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Returns all the Connection Settings registered to a particular BotService resource. + * Lists the available Service Providers for creating Connection Settings. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service connection settings response as paginated response with {@link PagedIterable}. + * @return the list of bot service providers response on successful completion of {@link Mono}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByBotService(String resourceGroupName, String resourceName) { - return new PagedIterable<>(listByBotServiceAsync(resourceGroupName, resourceName)); + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listServiceProvidersAsync() { + return listServiceProvidersWithResponseAsync().flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * Returns all the Connection Settings registered to a particular BotService resource. + * Lists the available Service Providers for creating Connection Settings. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service connection settings response as paginated response with {@link PagedIterable}. + * @return the list of bot service providers response along with {@link Response}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByBotService(String resourceGroupName, String resourceName, - Context context) { - return new PagedIterable<>(listByBotServiceAsync(resourceGroupName, resourceName, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listServiceProvidersWithResponse(Context context) { + final String accept = "application/json"; + return service.listServiceProvidersSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); + } + + /** + * Lists the available Service Providers for creating Connection Settings. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of bot service providers response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ServiceProviderResponseListInner listServiceProviders() { + return listServiceProvidersWithResponse(Context.NONE).getValue(); } /** @@ -1074,13 +790,6 @@ public PagedIterable listByBotService(String resourceGro */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByBotServiceNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listByBotServiceNext(nextLink, this.client.getEndpoint(), accept, context)) @@ -1089,6 +798,24 @@ private Mono> listByBotServiceNextSinglePa .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of bot service connection settings response along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByBotServiceNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByBotServiceNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1097,23 +824,14 @@ private Mono> listByBotServiceNextSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service connection settings response along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the list of bot service connection settings response along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByBotServiceNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByBotServiceNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByBotServiceNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByBotServiceNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/BotConnectionsImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/BotConnectionsImpl.java index be1e0ee7c074..7e4fcc9fd017 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/BotConnectionsImpl.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/BotConnectionsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.implementation; @@ -29,26 +29,49 @@ public BotConnectionsImpl(BotConnectionsClient innerClient, this.serviceManager = serviceManager; } - public Response listServiceProvidersWithResponse(Context context) { - Response inner - = this.serviceClient().listServiceProvidersWithResponse(context); + public Response getWithResponse(String resourceGroupName, String resourceName, + String connectionName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, resourceName, connectionName, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ServiceProviderResponseListImpl(inner.getValue(), this.manager())); + new ConnectionSettingImpl(inner.getValue(), this.manager())); } else { return null; } } - public ServiceProviderResponseList listServiceProviders() { - ServiceProviderResponseListInner inner = this.serviceClient().listServiceProviders(); + public ConnectionSetting get(String resourceGroupName, String resourceName, String connectionName) { + ConnectionSettingInner inner = this.serviceClient().get(resourceGroupName, resourceName, connectionName); if (inner != null) { - return new ServiceProviderResponseListImpl(inner, this.manager()); + return new ConnectionSettingImpl(inner, this.manager()); } else { return null; } } + public Response deleteWithResponse(String resourceGroupName, String resourceName, String connectionName, + Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, connectionName, context); + } + + public void delete(String resourceGroupName, String resourceName, String connectionName) { + this.serviceClient().delete(resourceGroupName, resourceName, connectionName); + } + + public PagedIterable listByBotService(String resourceGroupName, String resourceName) { + PagedIterable inner + = this.serviceClient().listByBotService(resourceGroupName, resourceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ConnectionSettingImpl(inner1, this.manager())); + } + + public PagedIterable listByBotService(String resourceGroupName, String resourceName, + Context context) { + PagedIterable inner + = this.serviceClient().listByBotService(resourceGroupName, resourceName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ConnectionSettingImpl(inner1, this.manager())); + } + public Response listWithSecretsWithResponse(String resourceGroupName, String resourceName, String connectionName, Context context) { Response inner = this.serviceClient() @@ -71,49 +94,26 @@ public ConnectionSetting listWithSecrets(String resourceGroupName, String resour } } - public Response getWithResponse(String resourceGroupName, String resourceName, - String connectionName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, resourceName, connectionName, context); + public Response listServiceProvidersWithResponse(Context context) { + Response inner + = this.serviceClient().listServiceProvidersWithResponse(context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ConnectionSettingImpl(inner.getValue(), this.manager())); + new ServiceProviderResponseListImpl(inner.getValue(), this.manager())); } else { return null; } } - public ConnectionSetting get(String resourceGroupName, String resourceName, String connectionName) { - ConnectionSettingInner inner = this.serviceClient().get(resourceGroupName, resourceName, connectionName); + public ServiceProviderResponseList listServiceProviders() { + ServiceProviderResponseListInner inner = this.serviceClient().listServiceProviders(); if (inner != null) { - return new ConnectionSettingImpl(inner, this.manager()); + return new ServiceProviderResponseListImpl(inner, this.manager()); } else { return null; } } - public Response deleteWithResponse(String resourceGroupName, String resourceName, String connectionName, - Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, connectionName, context); - } - - public void delete(String resourceGroupName, String resourceName, String connectionName) { - this.serviceClient().delete(resourceGroupName, resourceName, connectionName); - } - - public PagedIterable listByBotService(String resourceGroupName, String resourceName) { - PagedIterable inner - = this.serviceClient().listByBotService(resourceGroupName, resourceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ConnectionSettingImpl(inner1, this.manager())); - } - - public PagedIterable listByBotService(String resourceGroupName, String resourceName, - Context context) { - PagedIterable inner - = this.serviceClient().listByBotService(resourceGroupName, resourceName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ConnectionSettingImpl(inner1, this.manager())); - } - public ConnectionSetting getById(String id) { String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/BotImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/BotImpl.java index 6b907ec3f83e..dd77811207a3 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/BotImpl.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/BotImpl.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.implementation; import com.azure.core.management.Region; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.botservice.fluent.models.BotInner; import com.azure.resourcemanager.botservice.models.Bot; @@ -32,6 +33,10 @@ public String type() { return this.innerModel().type(); } + public BotProperties properties() { + return this.innerModel().properties(); + } + public String location() { return this.innerModel().location(); } @@ -45,10 +50,6 @@ public Map tags() { } } - public BotProperties properties() { - return this.innerModel().properties(); - } - public Sku sku() { return this.innerModel().sku(); } @@ -70,6 +71,10 @@ public List zones() { } } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public Region region() { return Region.fromName(this.regionName()); } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/AzureBotServiceBuilder.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/BotServiceManagementClientBuilder.java similarity index 63% rename from sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/AzureBotServiceBuilder.java rename to sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/BotServiceManagementClientBuilder.java index d5decb0087ce..8c3c28499429 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/AzureBotServiceBuilder.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/BotServiceManagementClientBuilder.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.implementation; @@ -15,39 +15,39 @@ import java.time.Duration; /** - * A builder for creating a new instance of the AzureBotServiceImpl type. + * A builder for creating a new instance of the BotServiceManagementClientImpl type. */ -@ServiceClientBuilder(serviceClients = { AzureBotServiceImpl.class }) -public final class AzureBotServiceBuilder { +@ServiceClientBuilder(serviceClients = { BotServiceManagementClientImpl.class }) +public final class BotServiceManagementClientBuilder { /* - * Azure Subscription ID. + * Service host */ - private String subscriptionId; + private String endpoint; /** - * Sets Azure Subscription ID. + * Sets Service host. * - * @param subscriptionId the subscriptionId value. - * @return the AzureBotServiceBuilder. + * @param endpoint the endpoint value. + * @return the BotServiceManagementClientBuilder. */ - public AzureBotServiceBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; + public BotServiceManagementClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; return this; } /* - * server parameter + * The ID of the target subscription. The value must be an UUID. */ - private String endpoint; + private String subscriptionId; /** - * Sets server parameter. + * Sets The ID of the target subscription. The value must be an UUID. * - * @param endpoint the endpoint value. - * @return the AzureBotServiceBuilder. + * @param subscriptionId the subscriptionId value. + * @return the BotServiceManagementClientBuilder. */ - public AzureBotServiceBuilder endpoint(String endpoint) { - this.endpoint = endpoint; + public BotServiceManagementClientBuilder subscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; return this; } @@ -60,9 +60,9 @@ public AzureBotServiceBuilder endpoint(String endpoint) { * Sets The environment to connect to. * * @param environment the environment value. - * @return the AzureBotServiceBuilder. + * @return the BotServiceManagementClientBuilder. */ - public AzureBotServiceBuilder environment(AzureEnvironment environment) { + public BotServiceManagementClientBuilder environment(AzureEnvironment environment) { this.environment = environment; return this; } @@ -76,9 +76,9 @@ public AzureBotServiceBuilder environment(AzureEnvironment environment) { * Sets The HTTP pipeline to send requests through. * * @param pipeline the pipeline value. - * @return the AzureBotServiceBuilder. + * @return the BotServiceManagementClientBuilder. */ - public AzureBotServiceBuilder pipeline(HttpPipeline pipeline) { + public BotServiceManagementClientBuilder pipeline(HttpPipeline pipeline) { this.pipeline = pipeline; return this; } @@ -92,9 +92,9 @@ public AzureBotServiceBuilder pipeline(HttpPipeline pipeline) { * Sets The default poll interval for long-running operation. * * @param defaultPollInterval the defaultPollInterval value. - * @return the AzureBotServiceBuilder. + * @return the BotServiceManagementClientBuilder. */ - public AzureBotServiceBuilder defaultPollInterval(Duration defaultPollInterval) { + public BotServiceManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { this.defaultPollInterval = defaultPollInterval; return this; } @@ -108,19 +108,19 @@ public AzureBotServiceBuilder defaultPollInterval(Duration defaultPollInterval) * Sets The serializer to serialize an object into a string. * * @param serializerAdapter the serializerAdapter value. - * @return the AzureBotServiceBuilder. + * @return the BotServiceManagementClientBuilder. */ - public AzureBotServiceBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + public BotServiceManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { this.serializerAdapter = serializerAdapter; return this; } /** - * Builds an instance of AzureBotServiceImpl with the provided parameters. + * Builds an instance of BotServiceManagementClientImpl with the provided parameters. * - * @return an instance of AzureBotServiceImpl. + * @return an instance of BotServiceManagementClientImpl. */ - public AzureBotServiceImpl buildClient() { + public BotServiceManagementClientImpl buildClient() { String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; HttpPipeline localPipeline = (pipeline != null) @@ -131,8 +131,8 @@ public AzureBotServiceImpl buildClient() { SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); - AzureBotServiceImpl client = new AzureBotServiceImpl(localPipeline, localSerializerAdapter, - localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); + BotServiceManagementClientImpl client = new BotServiceManagementClientImpl(localPipeline, + localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId); return client; } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/AzureBotServiceImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/BotServiceManagementClientImpl.java similarity index 66% rename from sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/AzureBotServiceImpl.java rename to sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/BotServiceManagementClientImpl.java index e48a4a6b7047..e644c838463a 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/AzureBotServiceImpl.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/BotServiceManagementClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.implementation; @@ -15,21 +15,30 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; +import com.azure.core.management.polling.SyncPollerFactory; +import com.azure.core.util.BinaryData; import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.AsyncPollResponse; import com.azure.core.util.polling.LongRunningOperationStatus; import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.botservice.fluent.AzureBotService; import com.azure.resourcemanager.botservice.fluent.BotConnectionsClient; +import com.azure.resourcemanager.botservice.fluent.BotServiceManagementClient; import com.azure.resourcemanager.botservice.fluent.BotsClient; import com.azure.resourcemanager.botservice.fluent.ChannelsClient; import com.azure.resourcemanager.botservice.fluent.DirectLinesClient; +import com.azure.resourcemanager.botservice.fluent.EmailsClient; import com.azure.resourcemanager.botservice.fluent.HostSettingsClient; +import com.azure.resourcemanager.botservice.fluent.NetworkSecurityPerimeterConfigurationsClient; +import com.azure.resourcemanager.botservice.fluent.OperationResultsClient; import com.azure.resourcemanager.botservice.fluent.OperationsClient; +import com.azure.resourcemanager.botservice.fluent.PrivateEndpointConnectionsClient; +import com.azure.resourcemanager.botservice.fluent.PrivateLinkResourcesClient; +import com.azure.resourcemanager.botservice.fluent.QnAMakerEndpointKeysClient; import java.io.IOException; import java.lang.reflect.Type; import java.nio.ByteBuffer; @@ -40,31 +49,17 @@ import reactor.core.publisher.Mono; /** - * Initializes a new instance of the AzureBotServiceImpl type. + * Initializes a new instance of the BotServiceManagementClientImpl type. */ -@ServiceClient(builder = AzureBotServiceBuilder.class) -public final class AzureBotServiceImpl implements AzureBotService { +@ServiceClient(builder = BotServiceManagementClientBuilder.class) +public final class BotServiceManagementClientImpl implements BotServiceManagementClient { /** - * Azure Subscription ID. - */ - private final String subscriptionId; - - /** - * Gets Azure Subscription ID. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** - * server parameter. + * Service host. */ private final String endpoint; /** - * Gets server parameter. + * Gets Service host. * * @return the endpoint value. */ @@ -73,12 +68,12 @@ public String getEndpoint() { } /** - * Api Version. + * Version parameter. */ private final String apiVersion; /** - * Gets Api Version. + * Gets Version parameter. * * @return the apiVersion value. */ @@ -86,6 +81,20 @@ public String getApiVersion() { return this.apiVersion; } + /** + * The ID of the target subscription. The value must be an UUID. + */ + private final String subscriptionId; + + /** + * Gets The ID of the target subscription. The value must be an UUID. + * + * @return the subscriptionId value. + */ + public String getSubscriptionId() { + return this.subscriptionId; + } + /** * The HTTP pipeline to send requests through. */ @@ -128,6 +137,20 @@ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } + /** + * The OperationsClient object to access its operations. + */ + private final OperationsClient operations; + + /** + * Gets the OperationsClient object to access its operations. + * + * @return the OperationsClient object. + */ + public OperationsClient getOperations() { + return this.operations; + } + /** * The BotsClient object to access its operations. */ @@ -142,6 +165,62 @@ public BotsClient getBots() { return this.bots; } + /** + * The PrivateEndpointConnectionsClient object to access its operations. + */ + private final PrivateEndpointConnectionsClient privateEndpointConnections; + + /** + * Gets the PrivateEndpointConnectionsClient object to access its operations. + * + * @return the PrivateEndpointConnectionsClient object. + */ + public PrivateEndpointConnectionsClient getPrivateEndpointConnections() { + return this.privateEndpointConnections; + } + + /** + * The NetworkSecurityPerimeterConfigurationsClient object to access its operations. + */ + private final NetworkSecurityPerimeterConfigurationsClient networkSecurityPerimeterConfigurations; + + /** + * Gets the NetworkSecurityPerimeterConfigurationsClient object to access its operations. + * + * @return the NetworkSecurityPerimeterConfigurationsClient object. + */ + public NetworkSecurityPerimeterConfigurationsClient getNetworkSecurityPerimeterConfigurations() { + return this.networkSecurityPerimeterConfigurations; + } + + /** + * The EmailsClient object to access its operations. + */ + private final EmailsClient emails; + + /** + * Gets the EmailsClient object to access its operations. + * + * @return the EmailsClient object. + */ + public EmailsClient getEmails() { + return this.emails; + } + + /** + * The PrivateLinkResourcesClient object to access its operations. + */ + private final PrivateLinkResourcesClient privateLinkResources; + + /** + * Gets the PrivateLinkResourcesClient object to access its operations. + * + * @return the PrivateLinkResourcesClient object. + */ + public PrivateLinkResourcesClient getPrivateLinkResources() { + return this.privateLinkResources; + } + /** * The ChannelsClient object to access its operations. */ @@ -171,31 +250,31 @@ public DirectLinesClient getDirectLines() { } /** - * The OperationsClient object to access its operations. + * The BotConnectionsClient object to access its operations. */ - private final OperationsClient operations; + private final BotConnectionsClient botConnections; /** - * Gets the OperationsClient object to access its operations. + * Gets the BotConnectionsClient object to access its operations. * - * @return the OperationsClient object. + * @return the BotConnectionsClient object. */ - public OperationsClient getOperations() { - return this.operations; + public BotConnectionsClient getBotConnections() { + return this.botConnections; } /** - * The BotConnectionsClient object to access its operations. + * The QnAMakerEndpointKeysClient object to access its operations. */ - private final BotConnectionsClient botConnections; + private final QnAMakerEndpointKeysClient qnAMakerEndpointKeys; /** - * Gets the BotConnectionsClient object to access its operations. + * Gets the QnAMakerEndpointKeysClient object to access its operations. * - * @return the BotConnectionsClient object. + * @return the QnAMakerEndpointKeysClient object. */ - public BotConnectionsClient getBotConnections() { - return this.botConnections; + public QnAMakerEndpointKeysClient getQnAMakerEndpointKeys() { + return this.qnAMakerEndpointKeys; } /** @@ -213,29 +292,49 @@ public HostSettingsClient getHostSettings() { } /** - * Initializes an instance of AzureBotService client. + * The OperationResultsClient object to access its operations. + */ + private final OperationResultsClient operationResults; + + /** + * Gets the OperationResultsClient object to access its operations. + * + * @return the OperationResultsClient object. + */ + public OperationResultsClient getOperationResults() { + return this.operationResults; + } + + /** + * Initializes an instance of BotServiceManagementClient client. * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. - * @param subscriptionId Azure Subscription ID. - * @param endpoint server parameter. + * @param endpoint Service host. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. */ - AzureBotServiceImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval, - AzureEnvironment environment, String subscriptionId, String endpoint) { + BotServiceManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2021-03-01"; + this.subscriptionId = subscriptionId; + this.apiVersion = "2023-09-15-preview"; + this.operations = new OperationsClientImpl(this); this.bots = new BotsClientImpl(this); + this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this); + this.networkSecurityPerimeterConfigurations = new NetworkSecurityPerimeterConfigurationsClientImpl(this); + this.emails = new EmailsClientImpl(this); + this.privateLinkResources = new PrivateLinkResourcesClientImpl(this); this.channels = new ChannelsClientImpl(this); this.directLines = new DirectLinesClientImpl(this); - this.operations = new OperationsClientImpl(this); this.botConnections = new BotConnectionsClientImpl(this); + this.qnAMakerEndpointKeys = new QnAMakerEndpointKeysClientImpl(this); this.hostSettings = new HostSettingsClientImpl(this); + this.operationResults = new OperationResultsClientImpl(this); } /** @@ -275,6 +374,23 @@ public PollerFlux, U> getLroResult(Mono type of poll result. + * @param type of final result. + * @return SyncPoller for poll result and final result. + */ + public SyncPoller, U> getLroResult(Response activationResponse, + Type pollResultType, Type finalResultType, Context context) { + return SyncPollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, () -> activationResponse, context); + } + /** * Gets the final result, or an error, based on last async poll response. * @@ -364,5 +480,5 @@ public Mono getBodyAsString(Charset charset) { } } - private static final ClientLogger LOGGER = new ClientLogger(AzureBotServiceImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(BotServiceManagementClientImpl.class); } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/BotsClientImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/BotsClientImpl.java index f532a566206d..9f6680544de5 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/BotsClientImpl.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/BotsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.implementation; @@ -33,7 +33,7 @@ import com.azure.resourcemanager.botservice.fluent.BotsClient; import com.azure.resourcemanager.botservice.fluent.models.BotInner; import com.azure.resourcemanager.botservice.fluent.models.CheckNameAvailabilityResponseBodyInner; -import com.azure.resourcemanager.botservice.models.BotResponseList; +import com.azure.resourcemanager.botservice.implementation.models.BotResponseList; import com.azure.resourcemanager.botservice.models.CheckNameAvailabilityRequestBody; import reactor.core.publisher.Mono; @@ -49,93 +49,161 @@ public final class BotsClientImpl implements BotsClient { /** * The service client containing this operation class. */ - private final AzureBotServiceImpl client; + private final BotServiceManagementClientImpl client; /** * Initializes an instance of BotsClientImpl. * * @param client the instance of the service client containing this operation class. */ - BotsClientImpl(AzureBotServiceImpl client) { + BotsClientImpl(BotServiceManagementClientImpl client) { this.service = RestProxy.create(BotsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureBotServiceBots to be used by the proxy service to perform REST - * calls. + * The interface defining all the services for BotServiceManagementClientBots to be used by the proxy service to + * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureBotServiceBots") + @Host("{endpoint}") + @ServiceInterface(name = "BotServiceManagementClientBots") public interface BotsService { @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BotInner parameters, Context context); + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create(@HostParam("$host") String endpoint, + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BotInner parameters, Context context); + + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> update(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") BotInner parameters, @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BotInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") BotInner parameters, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") BotInner parameters, @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + Context context); - @Headers({ "Content-Type: application/json" }) + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); + Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.BotService/botServices") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.BotService/botServices") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + @Post("/providers/Microsoft.BotService/checkNameAvailability") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getCheckNameAvailability( - @HostParam("$host") String endpoint, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CheckNameAvailabilityRequestBody parameters, - @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") CheckNameAvailabilityRequestBody parameters, Context context); + + @Post("/providers/Microsoft.BotService/checkNameAvailability") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getCheckNameAvailabilitySync( + @HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") CheckNameAvailabilityRequestBody parameters, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -143,57 +211,92 @@ Mono> listByResourceGroupNext( @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Creates a Bot Service. Bot Service is a resource group wide resource type. + * Returns a BotService specified by the parameters. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. - * @param parameters The parameters to provide for the created bot. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return bot resource definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync(String resourceGroupName, String resourceName, - BotInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String resourceName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), resourceGroupName, resourceName, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context)) + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Returns a BotService specified by the parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bot resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Returns a BotService specified by the parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bot resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Context context) { + final String accept = "application/json"; + return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); + } + + /** + * Returns a BotService specified by the parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bot resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BotInner getByResourceGroup(String resourceGroupName, String resourceName) { + return getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + } + /** * Creates a Bot Service. Bot Service is a resource group wide resource type. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param parameters The parameters to provide for the created bot. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -201,37 +304,18 @@ private Mono> createWithResponseAsync(String resourceGroupNam */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createWithResponseAsync(String resourceGroupName, String resourceName, - BotInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + BotInner parameters) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), resourceGroupName, resourceName, this.client.getApiVersion(), - this.client.getSubscriptionId(), parameters, accept, context); + return FluxUtil.withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, accept, parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a Bot Service. Bot Service is a resource group wide resource type. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param parameters The parameters to provide for the created bot. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -248,7 +332,7 @@ private Mono createAsync(String resourceGroupName, String resourceName /** * Creates a Bot Service. Bot Service is a resource group wide resource type. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param parameters The parameters to provide for the created bot. * @param context The context to associate with this operation. @@ -260,13 +344,16 @@ private Mono createAsync(String resourceGroupName, String resourceName @ServiceMethod(returns = ReturnType.SINGLE) public Response createWithResponse(String resourceGroupName, String resourceName, BotInner parameters, Context context) { - return createWithResponseAsync(resourceGroupName, resourceName, parameters, context).block(); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, accept, parameters, context); } /** * Creates a Bot Service. Bot Service is a resource group wide resource type. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param parameters The parameters to provide for the created bot. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -282,7 +369,7 @@ public BotInner create(String resourceGroupName, String resourceName, BotInner p /** * Updates a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param parameters The parameters to provide for the created bot. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -293,78 +380,17 @@ public BotInner create(String resourceGroupName, String resourceName, BotInner p @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync(String resourceGroupName, String resourceName, BotInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, resourceName, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context)) + return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param parameters The parameters to provide for the created bot. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bot resource definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String resourceName, - BotInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), resourceGroupName, resourceName, this.client.getApiVersion(), - this.client.getSubscriptionId(), parameters, accept, context); - } - - /** - * Updates a Bot Service. - * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param parameters The parameters to provide for the created bot. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -381,7 +407,7 @@ private Mono updateAsync(String resourceGroupName, String resourceName /** * Updates a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param parameters The parameters to provide for the created bot. * @param context The context to associate with this operation. @@ -393,13 +419,16 @@ private Mono updateAsync(String resourceGroupName, String resourceName @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse(String resourceGroupName, String resourceName, BotInner parameters, Context context) { - return updateWithResponseAsync(resourceGroupName, resourceName, parameters, context).block(); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, contentType, accept, parameters, context); } /** * Updates a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param parameters The parameters to provide for the created bot. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -415,7 +444,7 @@ public BotInner update(String resourceGroupName, String resourceName, BotInner p /** * Deletes a Bot Service from the resource group. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -424,67 +453,16 @@ public BotInner update(String resourceGroupName, String resourceName, BotInner p */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, resourceName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a Bot Service from the resource group. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, resourceName, this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context); - } - - /** - * Deletes a Bot Service from the resource group. - * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -499,7 +477,7 @@ private Mono deleteAsync(String resourceGroupName, String resourceName) { /** * Deletes a Bot Service from the resource group. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -509,13 +487,14 @@ private Mono deleteAsync(String resourceGroupName, String resourceName) { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String resourceName, Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, context).block(); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, context); } /** * Deletes a Bot Service from the resource group. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -526,128 +505,10 @@ public void delete(String resourceGroupName, String resourceName) { deleteWithResponse(resourceGroupName, resourceName, Context.NONE); } - /** - * Returns a BotService specified by the parameters. - * - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bot resource definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, - resourceName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Returns a BotService specified by the parameters. - * - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bot resource definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String resourceName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), resourceGroupName, resourceName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); - } - - /** - * Returns a BotService specified by the parameters. - * - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bot resource definition on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Returns a BotService specified by the parameters. - * - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bot resource definition along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block(); - } - - /** - * Returns a BotService specified by the parameters. - * - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bot resource definition. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BotInner getByResourceGroup(String resourceGroupName, String resourceName) { - return getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); - } - /** * Returns all the resources of a particular type belonging to a resource group. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -656,22 +517,10 @@ public BotInner getByResourceGroup(String resourceGroupName, String resourceName */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); @@ -680,73 +529,59 @@ private Mono> listByResourceGroupSinglePageAsync(String /** * Returns all the resources of a particular type belonging to a resource group. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the list of bot service operation response as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), resourceGroupName, this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * Returns all the resources of a particular type belonging to a resource group. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service operation response as paginated response with {@link PagedFlux}. + * @return the list of bot service operation response along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** * Returns all the resources of a particular type belonging to a resource group. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service operation response as paginated response with {@link PagedFlux}. + * @return the list of bot service operation response along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, Context context) { + final String accept = "application/json"; + Response res = service.listByResourceGroupSync(this.client.getEndpoint(), + this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** * Returns all the resources of a particular type belonging to a resource group. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -754,13 +589,14 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupName, C */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** * Returns all the resources of a particular type belonging to a resource group. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -769,7 +605,8 @@ public PagedIterable listByResourceGroup(String resourceGroupName) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** @@ -782,14 +619,6 @@ public PagedIterable listByResourceGroup(String resourceGroupName, Con */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), @@ -802,30 +631,13 @@ private Mono> listSinglePageAsync() { /** * Returns all the resources of a particular type belonging to a subscription. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the list of bot service operation response as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } /** @@ -833,11 +645,15 @@ private Mono> listSinglePageAsync(Context context) { * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service operation response as paginated response with {@link PagedFlux}. + * @return the list of bot service operation response along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -847,12 +663,15 @@ private PagedFlux listAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service operation response as paginated response with {@link PagedFlux}. + * @return the list of bot service operation response along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -864,7 +683,7 @@ private PagedFlux listAsync(Context context) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); } /** @@ -878,13 +697,13 @@ public PagedIterable list() { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); } /** * Check whether a bot name is available. * - * @param parameters The request body parameters to provide for the check name availability request. + * @param parameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -894,55 +713,18 @@ public PagedIterable list(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getCheckNameAvailabilityWithResponseAsync(CheckNameAvailabilityRequestBody parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.getCheckNameAvailability(this.client.getEndpoint(), - this.client.getApiVersion(), parameters, accept, context)) + this.client.getApiVersion(), contentType, accept, parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Check whether a bot name is available. * - * @param parameters The request body parameters to provide for the check name availability request. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body returned for a request to Bot Service Management to check availability of a bot name - * along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - getCheckNameAvailabilityWithResponseAsync(CheckNameAvailabilityRequestBody parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getCheckNameAvailability(this.client.getEndpoint(), this.client.getApiVersion(), parameters, - accept, context); - } - - /** - * Check whether a bot name is available. - * - * @param parameters The request body parameters to provide for the check name availability request. + * @param parameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -958,7 +740,7 @@ public PagedIterable list(Context context) { /** * Check whether a bot name is available. * - * @param parameters The request body parameters to provide for the check name availability request. + * @param parameters The request body. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -969,13 +751,16 @@ public PagedIterable list(Context context) { @ServiceMethod(returns = ReturnType.SINGLE) public Response getCheckNameAvailabilityWithResponse(CheckNameAvailabilityRequestBody parameters, Context context) { - return getCheckNameAvailabilityWithResponseAsync(parameters, context).block(); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.getCheckNameAvailabilitySync(this.client.getEndpoint(), this.client.getApiVersion(), contentType, + accept, parameters, context); } /** * Check whether a bot name is available. * - * @param parameters The request body parameters to provide for the check name availability request. + * @param parameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -999,13 +784,6 @@ public PagedIterable list(Context context) { */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -1015,6 +793,24 @@ private Mono> listByResourceGroupNextSinglePageAsync(Str .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of bot service operation response along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1023,23 +819,15 @@ private Mono> listByResourceGroupNextSinglePageAsync(Str * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the list of bot service operation response along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -1054,13 +842,6 @@ private Mono> listByResourceGroupNextSinglePageAsync(Str */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), @@ -1068,6 +849,23 @@ private Mono> listNextSinglePageAsync(String nextLink) { .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of bot service operation response along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -1076,22 +874,13 @@ private Mono> listNextSinglePageAsync(String nextLink) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the list of bot service operation response along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/BotsImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/BotsImpl.java index 1872c0e52be4..9e68a4c31f5d 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/BotsImpl.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/BotsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.implementation; @@ -29,15 +29,6 @@ public BotsImpl(BotsClient innerClient, com.azure.resourcemanager.botservice.Bot this.serviceManager = serviceManager; } - public Response deleteByResourceGroupWithResponse(String resourceGroupName, String resourceName, - Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, context); - } - - public void deleteByResourceGroup(String resourceGroupName, String resourceName) { - this.serviceClient().delete(resourceGroupName, resourceName); - } - public Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, Context context) { Response inner @@ -59,6 +50,15 @@ public Bot getByResourceGroup(String resourceGroupName, String resourceName) { } } + public Response deleteByResourceGroupWithResponse(String resourceGroupName, String resourceName, + Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, resourceName, context); + } + + public void deleteByResourceGroup(String resourceGroupName, String resourceName) { + this.serviceClient().delete(resourceGroupName, resourceName); + } + public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); return ResourceManagerUtils.mapPage(inner, inner1 -> new BotImpl(inner1, this.manager())); diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/ChannelsClientImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/ChannelsClientImpl.java index 9d202b7cd126..d12981c5d5ea 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/ChannelsClientImpl.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/ChannelsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.implementation; @@ -33,8 +33,8 @@ import com.azure.resourcemanager.botservice.fluent.ChannelsClient; import com.azure.resourcemanager.botservice.fluent.models.BotChannelInner; import com.azure.resourcemanager.botservice.fluent.models.ListChannelWithKeysResponseInner; +import com.azure.resourcemanager.botservice.implementation.models.ChannelResponseList; import com.azure.resourcemanager.botservice.models.ChannelName; -import com.azure.resourcemanager.botservice.models.ChannelResponseList; import reactor.core.publisher.Mono; /** @@ -49,145 +49,235 @@ public final class ChannelsClientImpl implements ChannelsClient { /** * The service client containing this operation class. */ - private final AzureBotServiceImpl client; + private final BotServiceManagementClientImpl client; /** * Initializes an instance of ChannelsClientImpl. * * @param client the instance of the service client containing this operation class. */ - ChannelsClientImpl(AzureBotServiceImpl client) { + ChannelsClientImpl(BotServiceManagementClientImpl client) { this.service = RestProxy.create(ChannelsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureBotServiceChannels to be used by the proxy service to perform - * REST calls. + * The interface defining all the services for BotServiceManagementClientChannels to be used by the proxy service to + * perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureBotServiceChann") + @Host("{endpoint}") + @ServiceInterface(name = "BotServiceManagementClientChannels") public interface ChannelsService { @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels/{channelName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("channelName") String channelName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels/{channelName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("channelName") String channelName, @HeaderParam("Accept") String accept, Context context); + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels/{channelName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> create(@HostParam("$host") String endpoint, + Mono> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("channelName") ChannelName channelName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") BotChannelInner parameters, @HeaderParam("Accept") String accept, + @PathParam("channelName") ChannelName channelName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BotChannelInner parameters, + Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels/{channelName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("channelName") ChannelName channelName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BotChannelInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels/{channelName}") @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> update(@HostParam("$host") String endpoint, + Mono> update(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("channelName") ChannelName channelName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, - @BodyParam("application/json") BotChannelInner parameters, @HeaderParam("Accept") String accept, + @PathParam("channelName") ChannelName channelName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BotChannelInner parameters, Context context); - @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels/{channelName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response updateSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("channelName") ChannelName channelName, @HeaderParam("Content-Type") String contentType, + @HeaderParam("Accept") String accept, @BodyParam("application/json") BotChannelInner parameters, + Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels/{channelName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("channelName") String channelName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels/{channelName}") @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> delete(@HostParam("$host") String endpoint, + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("channelName") String channelName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + @PathParam("channelName") String channelName, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels/{channelName}") + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> listByResourceGroup(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("channelName") String channelName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels/{channelName}/listChannelWithKeys") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listWithKeys(@HostParam("$host") String endpoint, + Mono> listWithKeys(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("channelName") ChannelName channelName, @QueryParam("api-version") String apiVersion, - @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); + @PathParam("channelName") ChannelName channelName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels") + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels/{channelName}/listChannelWithKeys") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, + Response listWithKeysSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); + @PathParam("channelName") ChannelName channelName, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByResourceGroupNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Creates a Channel registration for a Bot Service. + * Returns a BotService Channel registration specified by the parameters. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. - * @param channelName The name of the Channel resource. - * @param parameters The parameters to provide for the created bot. + * @param channelName The name of the Bot resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return bot channel resource definition along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createWithResponseAsync(String resourceGroupName, String resourceName, - ChannelName channelName, BotChannelInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (channelName == null) { - return Mono.error(new IllegalArgumentException("Parameter channelName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + private Mono> getWithResponseAsync(String resourceGroupName, String resourceName, + String channelName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.create(this.client.getEndpoint(), resourceGroupName, resourceName, - channelName, this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, channelName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Returns a BotService Channel registration specified by the parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param channelName The name of the Bot resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bot channel resource definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String resourceName, String channelName) { + return getWithResponseAsync(resourceGroupName, resourceName, channelName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Returns a BotService Channel registration specified by the parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param channelName The name of the Bot resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bot channel resource definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String resourceName, String channelName, + Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, channelName, accept, context); + } + + /** + * Returns a BotService Channel registration specified by the parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param channelName The name of the Bot resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bot channel resource definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BotChannelInner get(String resourceGroupName, String resourceName, String channelName) { + return getWithResponse(resourceGroupName, resourceName, channelName, Context.NONE).getValue(); + } + /** * Creates a Channel registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Channel resource. - * @param parameters The parameters to provide for the created bot. - * @param context The context to associate with this operation. + * @param parameters Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -195,43 +285,23 @@ private Mono> createWithResponseAsync(String resourceG */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createWithResponseAsync(String resourceGroupName, String resourceName, - ChannelName channelName, BotChannelInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (channelName == null) { - return Mono.error(new IllegalArgumentException("Parameter channelName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + ChannelName channelName, BotChannelInner parameters) { + final String contentType = "application/json"; final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.create(this.client.getEndpoint(), resourceGroupName, resourceName, channelName, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context); + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, channelName, contentType, accept, + parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates a Channel registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Channel resource. - * @param parameters The parameters to provide for the created bot. + * @param parameters Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -247,10 +317,10 @@ private Mono createAsync(String resourceGroupName, String resou /** * Creates a Channel registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Channel resource. - * @param parameters The parameters to provide for the created bot. + * @param parameters Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -260,16 +330,20 @@ private Mono createAsync(String resourceGroupName, String resou @ServiceMethod(returns = ReturnType.SINGLE) public Response createWithResponse(String resourceGroupName, String resourceName, ChannelName channelName, BotChannelInner parameters, Context context) { - return createWithResponseAsync(resourceGroupName, resourceName, channelName, parameters, context).block(); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, channelName, contentType, accept, + parameters, context); } /** * Creates a Channel registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Channel resource. - * @param parameters The parameters to provide for the created bot. + * @param parameters Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -284,7 +358,7 @@ public BotChannelInner create(String resourceGroupName, String resourceName, Cha /** * Updates a Channel registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Channel resource. * @param parameters The parameters to provide for the created bot. @@ -296,85 +370,19 @@ public BotChannelInner create(String resourceGroupName, String resourceName, Cha @ServiceMethod(returns = ReturnType.SINGLE) private Mono> updateWithResponseAsync(String resourceGroupName, String resourceName, ChannelName channelName, BotChannelInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (channelName == null) { - return Mono.error(new IllegalArgumentException("Parameter channelName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), resourceGroupName, resourceName, - channelName, this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, channelName, contentType, accept, + parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Updates a Channel registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param channelName The name of the Channel resource. - * @param parameters The parameters to provide for the created bot. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bot channel resource definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String resourceName, - ChannelName channelName, BotChannelInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (channelName == null) { - return Mono.error(new IllegalArgumentException("Parameter channelName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), resourceGroupName, resourceName, channelName, - this.client.getApiVersion(), this.client.getSubscriptionId(), parameters, accept, context); - } - - /** - * Updates a Channel registration for a Bot Service. - * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Channel resource. * @param parameters The parameters to provide for the created bot. @@ -393,7 +401,7 @@ private Mono updateAsync(String resourceGroupName, String resou /** * Updates a Channel registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Channel resource. * @param parameters The parameters to provide for the created bot. @@ -406,13 +414,17 @@ private Mono updateAsync(String resourceGroupName, String resou @ServiceMethod(returns = ReturnType.SINGLE) public Response updateWithResponse(String resourceGroupName, String resourceName, ChannelName channelName, BotChannelInner parameters, Context context) { - return updateWithResponseAsync(resourceGroupName, resourceName, channelName, parameters, context).block(); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, channelName, contentType, accept, + parameters, context); } /** * Updates a Channel registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Channel resource. * @param parameters The parameters to provide for the created bot. @@ -430,7 +442,7 @@ public BotChannelInner update(String resourceGroupName, String resourceName, Cha /** * Deletes a Channel registration from a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Bot resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -441,74 +453,16 @@ public BotChannelInner update(String resourceGroupName, String resourceName, Cha @ServiceMethod(returns = ReturnType.SINGLE) private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName, String channelName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (channelName == null) { - return Mono.error(new IllegalArgumentException("Parameter channelName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, resourceName, - channelName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, channelName, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes a Channel registration from a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param channelName The name of the Bot resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName, - String channelName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (channelName == null) { - return Mono.error(new IllegalArgumentException("Parameter channelName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), resourceGroupName, resourceName, channelName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); - } - - /** - * Deletes a Channel registration from a Bot Service. - * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Bot resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -524,7 +478,7 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, St /** * Deletes a Channel registration from a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Bot resource. * @param context The context to associate with this operation. @@ -536,13 +490,14 @@ private Mono deleteAsync(String resourceGroupName, String resourceName, St @ServiceMethod(returns = ReturnType.SINGLE) public Response deleteWithResponse(String resourceGroupName, String resourceName, String channelName, Context context) { - return deleteWithResponseAsync(resourceGroupName, resourceName, channelName, context).block(); + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, channelName, context); } /** * Deletes a Channel registration from a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Bot resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -555,181 +510,127 @@ public void delete(String resourceGroupName, String resourceName, String channel } /** - * Returns a BotService Channel registration specified by the parameters. + * Returns all the Channel registrations of a particular BotService resource. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. - * @param channelName The name of the Bot resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bot channel resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the list of bot service channel operation response along with {@link PagedResponse} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String resourceName, - String channelName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (channelName == null) { - return Mono.error(new IllegalArgumentException("Parameter channelName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + String resourceName) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), resourceGroupName, resourceName, channelName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Returns a BotService Channel registration specified by the parameters. + * Returns all the Channel registrations of a particular BotService resource. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. - * @param channelName The name of the Bot resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bot channel resource definition along with {@link Response} on successful completion of {@link Mono}. + * @return the list of bot service channel operation response as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String resourceName, - String channelName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (channelName == null) { - return Mono.error(new IllegalArgumentException("Parameter channelName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), resourceGroupName, resourceName, channelName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, String resourceName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** - * Returns a BotService Channel registration specified by the parameters. + * Returns all the Channel registrations of a particular BotService resource. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. - * @param channelName The name of the Bot resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bot channel resource definition on successful completion of {@link Mono}. + * @return the list of bot service channel operation response along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String resourceName, String channelName) { - return getWithResponseAsync(resourceGroupName, resourceName, channelName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, + String resourceName) { + final String accept = "application/json"; + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Returns a BotService Channel registration specified by the parameters. + * Returns all the Channel registrations of a particular BotService resource. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. - * @param channelName The name of the Bot resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bot channel resource definition along with {@link Response}. + * @return the list of bot service channel operation response along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String resourceName, String channelName, + private PagedResponse listByResourceGroupSinglePage(String resourceGroupName, String resourceName, Context context) { - return getWithResponseAsync(resourceGroupName, resourceName, channelName, context).block(); + final String accept = "application/json"; + Response res + = service.listByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Returns a BotService Channel registration specified by the parameters. + * Returns all the Channel registrations of a particular BotService resource. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. - * @param channelName The name of the Bot resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bot channel resource definition. + * @return the list of bot service channel operation response as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BotChannelInner get(String resourceGroupName, String resourceName, String channelName) { - return getWithResponse(resourceGroupName, resourceName, channelName, Context.NONE).getValue(); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, String resourceName) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, resourceName), + nextLink -> listByResourceGroupNextSinglePage(nextLink)); } /** - * Lists a Channel registration for a Bot Service including secrets. + * Returns all the Channel registrations of a particular BotService resource. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. - * @param channelName The name of the Channel resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the ARM channel of list channel with keys operation response along with {@link Response} on successful - * completion of {@link Mono}. + * @return the list of bot service channel operation response as paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithKeysWithResponseAsync(String resourceGroupName, - String resourceName, ChannelName channelName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (channelName == null) { - return Mono.error(new IllegalArgumentException("Parameter channelName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listWithKeys(this.client.getEndpoint(), resourceGroupName, resourceName, - channelName, this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, String resourceName, + Context context) { + return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, resourceName, context), + nextLink -> listByResourceGroupNextSinglePage(nextLink, context)); } /** * Lists a Channel registration for a Bot Service including secrets. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Channel resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -738,35 +639,18 @@ private Mono> listWithKeysWithRespons */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listWithKeysWithResponseAsync(String resourceGroupName, - String resourceName, ChannelName channelName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (channelName == null) { - return Mono.error(new IllegalArgumentException("Parameter channelName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + String resourceName, ChannelName channelName) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listWithKeys(this.client.getEndpoint(), resourceGroupName, resourceName, channelName, - this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context); + return FluxUtil + .withContext(context -> service.listWithKeys(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, channelName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists a Channel registration for a Bot Service including secrets. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Channel resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -784,7 +668,7 @@ private Mono listWithKeysAsync(String resource /** * Lists a Channel registration for a Bot Service including secrets. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Channel resource. * @param context The context to associate with this operation. @@ -796,13 +680,15 @@ private Mono listWithKeysAsync(String resource @ServiceMethod(returns = ReturnType.SINGLE) public Response listWithKeysWithResponse(String resourceGroupName, String resourceName, ChannelName channelName, Context context) { - return listWithKeysWithResponseAsync(resourceGroupName, resourceName, channelName, context).block(); + final String accept = "application/json"; + return service.listWithKeysSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, channelName, accept, context); } /** * Lists a Channel registration for a Bot Service including secrets. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Channel resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -817,10 +703,9 @@ public ListChannelWithKeysResponseInner listWithKeys(String resourceGroupName, S } /** - * Returns all the Channel registrations of a particular BotService resource. + * Get the next page of items. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. + * @param nextLink The URL to get the next list of items. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -828,137 +713,16 @@ public ListChannelWithKeysResponseInner listWithKeys(String resourceGroupName, S * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - String resourceName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { final String accept = "application/json"; return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, - resourceName, this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Returns all the Channel registrations of a particular BotService resource. - * - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service channel operation response along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - String resourceName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), resourceGroupName, resourceName, - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Returns all the Channel registrations of a particular BotService resource. - * - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service channel operation response as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String resourceName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, resourceName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Returns all the Channel registrations of a particular BotService resource. - * - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service channel operation response as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, String resourceName, - Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, resourceName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * Returns all the Channel registrations of a particular BotService resource. - * - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service channel operation response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, String resourceName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, resourceName)); - } - - /** - * Returns all the Channel registrations of a particular BotService resource. - * - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service channel operation response as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, String resourceName, - Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, resourceName, context)); - } - /** * Get the next page of items. * @@ -966,25 +730,15 @@ public PagedIterable listByResourceGroup(String resourceGroupNa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service channel operation response along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the list of bot service channel operation response along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink) { final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** @@ -995,23 +749,14 @@ private Mono> listByResourceGroupNextSinglePageAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service channel operation response along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * @return the list of bot service channel operation response along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/ChannelsImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/ChannelsImpl.java index 4b4f3137b71e..f7e64a79e689 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/ChannelsImpl.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/ChannelsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.implementation; @@ -30,6 +30,27 @@ public ChannelsImpl(ChannelsClient innerClient, this.serviceManager = serviceManager; } + public Response getWithResponse(String resourceGroupName, String resourceName, String channelName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, resourceName, channelName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new BotChannelImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public BotChannel get(String resourceGroupName, String resourceName, String channelName) { + BotChannelInner inner = this.serviceClient().get(resourceGroupName, resourceName, channelName); + if (inner != null) { + return new BotChannelImpl(inner, this.manager()); + } else { + return null; + } + } + public Response createWithResponse(String resourceGroupName, String resourceName, ChannelName channelName, BotChannelInner parameters, Context context) { Response inner = this.serviceClient() @@ -83,25 +104,17 @@ public void delete(String resourceGroupName, String resourceName, String channel this.serviceClient().delete(resourceGroupName, resourceName, channelName); } - public Response getWithResponse(String resourceGroupName, String resourceName, String channelName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, resourceName, channelName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new BotChannelImpl(inner.getValue(), this.manager())); - } else { - return null; - } + public PagedIterable listByResourceGroup(String resourceGroupName, String resourceName) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, resourceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BotChannelImpl(inner1, this.manager())); } - public BotChannel get(String resourceGroupName, String resourceName, String channelName) { - BotChannelInner inner = this.serviceClient().get(resourceGroupName, resourceName, channelName); - if (inner != null) { - return new BotChannelImpl(inner, this.manager()); - } else { - return null; - } + public PagedIterable listByResourceGroup(String resourceGroupName, String resourceName, + Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, resourceName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BotChannelImpl(inner1, this.manager())); } public Response listWithKeysWithResponse(String resourceGroupName, String resourceName, @@ -127,19 +140,6 @@ public ListChannelWithKeysResponse listWithKeys(String resourceGroupName, String } } - public PagedIterable listByResourceGroup(String resourceGroupName, String resourceName) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, resourceName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new BotChannelImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, String resourceName, - Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, resourceName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new BotChannelImpl(inner1, this.manager())); - } - private ChannelsClient serviceClient() { return this.innerClient; } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/CheckNameAvailabilityResponseBodyImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/CheckNameAvailabilityResponseBodyImpl.java index eb215e529747..687bbeb3892c 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/CheckNameAvailabilityResponseBodyImpl.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/CheckNameAvailabilityResponseBodyImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.implementation; diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/ConnectionSettingImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/ConnectionSettingImpl.java index e592b2410ca9..4767e47bf996 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/ConnectionSettingImpl.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/ConnectionSettingImpl.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.implementation; import com.azure.core.http.rest.Response; import com.azure.core.management.Region; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.botservice.fluent.models.ConnectionSettingInner; import com.azure.resourcemanager.botservice.models.ConnectionSetting; @@ -34,6 +35,10 @@ public String type() { return this.innerModel().type(); } + public ConnectionSettingProperties properties() { + return this.innerModel().properties(); + } + public String location() { return this.innerModel().location(); } @@ -47,10 +52,6 @@ public Map tags() { } } - public ConnectionSettingProperties properties() { - return this.innerModel().properties(); - } - public Sku sku() { return this.innerModel().sku(); } @@ -72,6 +73,10 @@ public List zones() { } } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public Region region() { return Region.fromName(this.regionName()); } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/CreateEmailSignInUrlResponseImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/CreateEmailSignInUrlResponseImpl.java new file mode 100644 index 000000000000..8be241743556 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/CreateEmailSignInUrlResponseImpl.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.implementation; + +import com.azure.resourcemanager.botservice.fluent.models.CreateEmailSignInUrlResponseInner; +import com.azure.resourcemanager.botservice.models.CreateEmailSignInUrlResponse; +import com.azure.resourcemanager.botservice.models.CreateEmailSignInUrlResponseProperties; + +public final class CreateEmailSignInUrlResponseImpl implements CreateEmailSignInUrlResponse { + private CreateEmailSignInUrlResponseInner innerObject; + + private final com.azure.resourcemanager.botservice.BotServiceManager serviceManager; + + CreateEmailSignInUrlResponseImpl(CreateEmailSignInUrlResponseInner innerObject, + com.azure.resourcemanager.botservice.BotServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String location() { + return this.innerModel().location(); + } + + public CreateEmailSignInUrlResponseProperties properties() { + return this.innerModel().properties(); + } + + public CreateEmailSignInUrlResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.botservice.BotServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/DirectLinesClientImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/DirectLinesClientImpl.java index dca471a4fd16..f1a3da15506f 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/DirectLinesClientImpl.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/DirectLinesClientImpl.java @@ -1,13 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.implementation; import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.ExpectedResponses; import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; import com.azure.core.annotation.PathParam; @@ -40,42 +39,51 @@ public final class DirectLinesClientImpl implements DirectLinesClient { /** * The service client containing this operation class. */ - private final AzureBotServiceImpl client; + private final BotServiceManagementClientImpl client; /** * Initializes an instance of DirectLinesClientImpl. * * @param client the instance of the service client containing this operation class. */ - DirectLinesClientImpl(AzureBotServiceImpl client) { + DirectLinesClientImpl(BotServiceManagementClientImpl client) { this.service = RestProxy.create(DirectLinesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureBotServiceDirectLines to be used by the proxy service to perform - * REST calls. + * The interface defining all the services for BotServiceManagementClientDirectLines to be used by the proxy service + * to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureBotServiceDirec") + @Host("{endpoint}") + @ServiceInterface(name = "BotServiceManagementClientDirectLines") public interface DirectLinesService { - @Headers({ "Content-Type: application/json" }) @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels/{channelName}/regeneratekeys") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> regenerateKeys(@HostParam("$host") String endpoint, + Mono> regenerateKeys(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, - @PathParam("subscriptionId") String subscriptionId, @PathParam("channelName") RegenerateKeysChannelName channelName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") SiteInfo parameters, - @HeaderParam("Accept") String accept, Context context); + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") SiteInfo parameters, Context context); + + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/channels/{channelName}/regeneratekeys") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response regenerateKeysSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("channelName") RegenerateKeysChannelName channelName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") SiteInfo parameters, Context context); } /** * Regenerates secret keys and returns them for the DirectLine Channel of a particular BotService resource. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Channel resource for which keys are to be regenerated. * @param parameters The parameters to provide for the created bot. @@ -87,85 +95,19 @@ Mono> regenerateKeys(@HostParam("$host") String endpoi @ServiceMethod(returns = ReturnType.SINGLE) private Mono> regenerateKeysWithResponseAsync(String resourceGroupName, String resourceName, RegenerateKeysChannelName channelName, SiteInfo parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (channelName == null) { - return Mono.error(new IllegalArgumentException("Parameter channelName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } + final String contentType = "application/json"; final String accept = "application/json"; return FluxUtil - .withContext(context -> service.regenerateKeys(this.client.getEndpoint(), resourceGroupName, resourceName, - this.client.getSubscriptionId(), channelName, this.client.getApiVersion(), parameters, accept, context)) + .withContext(context -> service.regenerateKeys(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, channelName, contentType, accept, + parameters, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Regenerates secret keys and returns them for the DirectLine Channel of a particular BotService resource. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param channelName The name of the Channel resource for which keys are to be regenerated. - * @param parameters The parameters to provide for the created bot. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bot channel resource definition along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> regenerateKeysWithResponseAsync(String resourceGroupName, - String resourceName, RegenerateKeysChannelName channelName, SiteInfo parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (resourceName == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (channelName == null) { - return Mono.error(new IllegalArgumentException("Parameter channelName is required and cannot be null.")); - } - if (parameters == null) { - return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null.")); - } else { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.regenerateKeys(this.client.getEndpoint(), resourceGroupName, resourceName, - this.client.getSubscriptionId(), channelName, this.client.getApiVersion(), parameters, accept, context); - } - - /** - * Regenerates secret keys and returns them for the DirectLine Channel of a particular BotService resource. - * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Channel resource for which keys are to be regenerated. * @param parameters The parameters to provide for the created bot. @@ -184,7 +126,7 @@ private Mono regenerateKeysAsync(String resourceGroupName, Stri /** * Regenerates secret keys and returns them for the DirectLine Channel of a particular BotService resource. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Channel resource for which keys are to be regenerated. * @param parameters The parameters to provide for the created bot. @@ -197,14 +139,17 @@ private Mono regenerateKeysAsync(String resourceGroupName, Stri @ServiceMethod(returns = ReturnType.SINGLE) public Response regenerateKeysWithResponse(String resourceGroupName, String resourceName, RegenerateKeysChannelName channelName, SiteInfo parameters, Context context) { - return regenerateKeysWithResponseAsync(resourceGroupName, resourceName, channelName, parameters, context) - .block(); + final String contentType = "application/json"; + final String accept = "application/json"; + return service.regenerateKeysSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, channelName, contentType, accept, + parameters, context); } /** * Regenerates secret keys and returns them for the DirectLine Channel of a particular BotService resource. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Channel resource for which keys are to be regenerated. * @param parameters The parameters to provide for the created bot. diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/DirectLinesImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/DirectLinesImpl.java index fbde7f806541..f79d6d0fe0e3 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/DirectLinesImpl.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/DirectLinesImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.implementation; diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/EmailsClientImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/EmailsClientImpl.java new file mode 100644 index 000000000000..e0f2be732280 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/EmailsClientImpl.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.botservice.fluent.EmailsClient; +import com.azure.resourcemanager.botservice.fluent.models.CreateEmailSignInUrlResponseInner; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in EmailsClient. + */ +public final class EmailsClientImpl implements EmailsClient { + /** + * The proxy service used to perform REST calls. + */ + private final EmailsService service; + + /** + * The service client containing this operation class. + */ + private final BotServiceManagementClientImpl client; + + /** + * Initializes an instance of EmailsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + EmailsClientImpl(BotServiceManagementClientImpl client) { + this.service = RestProxy.create(EmailsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for BotServiceManagementClientEmails to be used by the proxy service to + * perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "BotServiceManagementClientEmails") + public interface EmailsService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/createEmailSignInUrl") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createSignInUrl(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/createEmailSignInUrl") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSignInUrlSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Creates an email channel sign in url for a Bot Service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the ARM create email sign in url operation response along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createSignInUrlWithResponseAsync(String resourceGroupName, + String resourceName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createSignInUrl(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates an email channel sign in url for a Bot Service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the ARM create email sign in url operation response on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createSignInUrlAsync(String resourceGroupName, + String resourceName) { + return createSignInUrlWithResponseAsync(resourceGroupName, resourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Creates an email channel sign in url for a Bot Service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the ARM create email sign in url operation response along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createSignInUrlWithResponse(String resourceGroupName, + String resourceName, Context context) { + final String accept = "application/json"; + return service.createSignInUrlSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); + } + + /** + * Creates an email channel sign in url for a Bot Service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the ARM create email sign in url operation response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CreateEmailSignInUrlResponseInner createSignInUrl(String resourceGroupName, String resourceName) { + return createSignInUrlWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/EmailsImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/EmailsImpl.java new file mode 100644 index 000000000000..f7a19956aa60 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/EmailsImpl.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.botservice.fluent.EmailsClient; +import com.azure.resourcemanager.botservice.fluent.models.CreateEmailSignInUrlResponseInner; +import com.azure.resourcemanager.botservice.models.CreateEmailSignInUrlResponse; +import com.azure.resourcemanager.botservice.models.Emails; + +public final class EmailsImpl implements Emails { + private static final ClientLogger LOGGER = new ClientLogger(EmailsImpl.class); + + private final EmailsClient innerClient; + + private final com.azure.resourcemanager.botservice.BotServiceManager serviceManager; + + public EmailsImpl(EmailsClient innerClient, com.azure.resourcemanager.botservice.BotServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response createSignInUrlWithResponse(String resourceGroupName, + String resourceName, Context context) { + Response inner + = this.serviceClient().createSignInUrlWithResponse(resourceGroupName, resourceName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new CreateEmailSignInUrlResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public CreateEmailSignInUrlResponse createSignInUrl(String resourceGroupName, String resourceName) { + CreateEmailSignInUrlResponseInner inner = this.serviceClient().createSignInUrl(resourceGroupName, resourceName); + if (inner != null) { + return new CreateEmailSignInUrlResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + private EmailsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.botservice.BotServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/HostSettingsClientImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/HostSettingsClientImpl.java index 0708c232d112..84f3e0dc7164 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/HostSettingsClientImpl.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/HostSettingsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.implementation; @@ -37,31 +37,39 @@ public final class HostSettingsClientImpl implements HostSettingsClient { /** * The service client containing this operation class. */ - private final AzureBotServiceImpl client; + private final BotServiceManagementClientImpl client; /** * Initializes an instance of HostSettingsClientImpl. * * @param client the instance of the service client containing this operation class. */ - HostSettingsClientImpl(AzureBotServiceImpl client) { + HostSettingsClientImpl(BotServiceManagementClientImpl client) { this.service = RestProxy.create(HostSettingsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureBotServiceHostSettings to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for BotServiceManagementClientHostSettings to be used by the proxy + * service to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureBotServiceHostS") + @Host("{endpoint}") + @ServiceInterface(name = "BotServiceManagementClientHostSettings") public interface HostSettingsService { @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.BotService/hostSettings") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.BotService/hostSettings") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, @HeaderParam("Accept") String accept, Context context); } @@ -76,14 +84,6 @@ Mono> get(@HostParam("$host") String endpoin */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), @@ -91,32 +91,6 @@ private Mono> getWithResponseAsync() { .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } - /** - * Get per subscription settings needed to host bot in compute resource such as Azure App Service. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return per subscription settings needed to host bot in compute resource such as Azure App Service along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - accept, context); - } - /** * Get per subscription settings needed to host bot in compute resource such as Azure App Service. * @@ -142,7 +116,9 @@ private Mono getAsync() { */ @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse(Context context) { - return getWithResponseAsync(context).block(); + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + accept, context); } /** diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/HostSettingsImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/HostSettingsImpl.java index 39b79e044b49..01a137e394a9 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/HostSettingsImpl.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/HostSettingsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.implementation; diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/HostSettingsResponseImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/HostSettingsResponseImpl.java index 9b1db6529c67..0b1327e3c012 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/HostSettingsResponseImpl.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/HostSettingsResponseImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.implementation; diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/ListChannelWithKeysResponseImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/ListChannelWithKeysResponseImpl.java index 9bb76334efa8..899645f8df37 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/ListChannelWithKeysResponseImpl.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/ListChannelWithKeysResponseImpl.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.botservice.fluent.models.ListChannelWithKeysResponseInner; import com.azure.resourcemanager.botservice.models.Channel; import com.azure.resourcemanager.botservice.models.ChannelSettings; @@ -37,6 +38,10 @@ public String type() { return this.innerModel().type(); } + public Channel properties() { + return this.innerModel().properties(); + } + public String location() { return this.innerModel().location(); } @@ -50,10 +55,6 @@ public Map tags() { } } - public Channel properties() { - return this.innerModel().properties(); - } - public Sku sku() { return this.innerModel().sku(); } @@ -75,6 +76,10 @@ public List zones() { } } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public Channel resource() { return this.innerModel().resource(); } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/NetworkSecurityPerimeterConfigurationImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/NetworkSecurityPerimeterConfigurationImpl.java new file mode 100644 index 000000000000..04558a3dd567 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/NetworkSecurityPerimeterConfigurationImpl.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.botservice.fluent.models.NetworkSecurityPerimeterConfigurationInner; +import com.azure.resourcemanager.botservice.models.NetworkSecurityPerimeterConfiguration; +import com.azure.resourcemanager.botservice.models.NetworkSecurityPerimeterConfigurationProperties; + +public final class NetworkSecurityPerimeterConfigurationImpl implements NetworkSecurityPerimeterConfiguration { + private NetworkSecurityPerimeterConfigurationInner innerObject; + + private final com.azure.resourcemanager.botservice.BotServiceManager serviceManager; + + NetworkSecurityPerimeterConfigurationImpl(NetworkSecurityPerimeterConfigurationInner innerObject, + com.azure.resourcemanager.botservice.BotServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public NetworkSecurityPerimeterConfigurationProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public NetworkSecurityPerimeterConfigurationInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.botservice.BotServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java new file mode 100644 index 000000000000..4278b5285ff7 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java @@ -0,0 +1,613 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.botservice.fluent.NetworkSecurityPerimeterConfigurationsClient; +import com.azure.resourcemanager.botservice.fluent.models.NetworkSecurityPerimeterConfigurationInner; +import com.azure.resourcemanager.botservice.implementation.models.NetworkSecurityPerimeterConfigurationList; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in + * NetworkSecurityPerimeterConfigurationsClient. + */ +public final class NetworkSecurityPerimeterConfigurationsClientImpl + implements NetworkSecurityPerimeterConfigurationsClient { + /** + * The proxy service used to perform REST calls. + */ + private final NetworkSecurityPerimeterConfigurationsService service; + + /** + * The service client containing this operation class. + */ + private final BotServiceManagementClientImpl client; + + /** + * Initializes an instance of NetworkSecurityPerimeterConfigurationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + NetworkSecurityPerimeterConfigurationsClientImpl(BotServiceManagementClientImpl client) { + this.service = RestProxy.create(NetworkSecurityPerimeterConfigurationsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for BotServiceManagementClientNetworkSecurityPerimeterConfigurations to + * be used by the proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "BotServiceManagementClientNetworkSecurityPerimeterConfigurations") + public interface NetworkSecurityPerimeterConfigurationsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("networkSecurityPerimeterConfigurationName") String networkSecurityPerimeterConfigurationName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("networkSecurityPerimeterConfigurationName") String networkSecurityPerimeterConfigurationName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/networkSecurityPerimeterConfigurations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/networkSecurityPerimeterConfigurations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName}/reconcile") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> reconcile(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("networkSecurityPerimeterConfigurationName") String networkSecurityPerimeterConfigurationName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName}/reconcile") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response reconcileSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("networkSecurityPerimeterConfigurationName") String networkSecurityPerimeterConfigurationName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the specified Network Security Perimeter configuration associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param networkSecurityPerimeterConfigurationName The resource association Name. Composed of parameter guid and + * association name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Network Security Perimeter configuration associated with the Bot along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String resourceName, String networkSecurityPerimeterConfigurationName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, + networkSecurityPerimeterConfigurationName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the specified Network Security Perimeter configuration associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param networkSecurityPerimeterConfigurationName The resource association Name. Composed of parameter guid and + * association name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Network Security Perimeter configuration associated with the Bot on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String resourceName, + String networkSecurityPerimeterConfigurationName) { + return getWithResponseAsync(resourceGroupName, resourceName, networkSecurityPerimeterConfigurationName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the specified Network Security Perimeter configuration associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param networkSecurityPerimeterConfigurationName The resource association Name. Composed of parameter guid and + * association name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Network Security Perimeter configuration associated with the Bot along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, + String resourceName, String networkSecurityPerimeterConfigurationName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, networkSecurityPerimeterConfigurationName, accept, context); + } + + /** + * Gets the specified Network Security Perimeter configuration associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param networkSecurityPerimeterConfigurationName The resource association Name. Composed of parameter guid and + * association name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Network Security Perimeter configuration associated with the Bot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkSecurityPerimeterConfigurationInner get(String resourceGroupName, String resourceName, + String networkSecurityPerimeterConfigurationName) { + return getWithResponse(resourceGroupName, resourceName, networkSecurityPerimeterConfigurationName, Context.NONE) + .getValue(); + } + + /** + * List Network Security Perimeter configurations associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the List NetworkSecurityPerimeterConfiguration operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listSinglePageAsync(String resourceGroupName, String resourceName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .>map( + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Network Security Perimeter configurations associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the List NetworkSecurityPerimeterConfiguration operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, + String resourceName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List Network Security Perimeter configurations associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the List NetworkSecurityPerimeterConfiguration operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, + String resourceName) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List Network Security Perimeter configurations associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the List NetworkSecurityPerimeterConfiguration operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, + String resourceName, Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List Network Security Perimeter configurations associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the List NetworkSecurityPerimeterConfiguration operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, + String resourceName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, resourceName), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * List Network Security Perimeter configurations associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the List NetworkSecurityPerimeterConfiguration operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String resourceName, + Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, resourceName, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * Reconcile the specified Network Security Perimeter configuration associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param networkSecurityPerimeterConfigurationName The resource association Name. Composed of parameter guid and + * association name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> reconcileWithResponseAsync(String resourceGroupName, String resourceName, + String networkSecurityPerimeterConfigurationName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.reconcile(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, + networkSecurityPerimeterConfigurationName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Reconcile the specified Network Security Perimeter configuration associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param networkSecurityPerimeterConfigurationName The resource association Name. Composed of parameter guid and + * association name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response reconcileWithResponse(String resourceGroupName, String resourceName, + String networkSecurityPerimeterConfigurationName) { + final String accept = "application/json"; + return service.reconcileSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, networkSecurityPerimeterConfigurationName, + accept, Context.NONE); + } + + /** + * Reconcile the specified Network Security Perimeter configuration associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param networkSecurityPerimeterConfigurationName The resource association Name. Composed of parameter guid and + * association name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response reconcileWithResponse(String resourceGroupName, String resourceName, + String networkSecurityPerimeterConfigurationName, Context context) { + final String accept = "application/json"; + return service.reconcileSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, networkSecurityPerimeterConfigurationName, + accept, context); + } + + /** + * Reconcile the specified Network Security Perimeter configuration associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param networkSecurityPerimeterConfigurationName The resource association Name. Composed of parameter guid and + * association name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private + PollerFlux, NetworkSecurityPerimeterConfigurationInner> + beginReconcileAsync(String resourceGroupName, String resourceName, + String networkSecurityPerimeterConfigurationName) { + Mono>> mono + = reconcileWithResponseAsync(resourceGroupName, resourceName, networkSecurityPerimeterConfigurationName); + return this.client + .getLroResult(mono, + this.client.getHttpPipeline(), NetworkSecurityPerimeterConfigurationInner.class, + NetworkSecurityPerimeterConfigurationInner.class, this.client.getContext()); + } + + /** + * Reconcile the specified Network Security Perimeter configuration associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param networkSecurityPerimeterConfigurationName The resource association Name. Composed of parameter guid and + * association name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, NetworkSecurityPerimeterConfigurationInner> + beginReconcile(String resourceGroupName, String resourceName, + String networkSecurityPerimeterConfigurationName) { + Response response + = reconcileWithResponse(resourceGroupName, resourceName, networkSecurityPerimeterConfigurationName); + return this.client + .getLroResult( + response, NetworkSecurityPerimeterConfigurationInner.class, + NetworkSecurityPerimeterConfigurationInner.class, Context.NONE); + } + + /** + * Reconcile the specified Network Security Perimeter configuration associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param networkSecurityPerimeterConfigurationName The resource association Name. Composed of parameter guid and + * association name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public + SyncPoller, NetworkSecurityPerimeterConfigurationInner> + beginReconcile(String resourceGroupName, String resourceName, String networkSecurityPerimeterConfigurationName, + Context context) { + Response response = reconcileWithResponse(resourceGroupName, resourceName, + networkSecurityPerimeterConfigurationName, context); + return this.client + .getLroResult( + response, NetworkSecurityPerimeterConfigurationInner.class, + NetworkSecurityPerimeterConfigurationInner.class, context); + } + + /** + * Reconcile the specified Network Security Perimeter configuration associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param networkSecurityPerimeterConfigurationName The resource association Name. Composed of parameter guid and + * association name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono reconcileAsync(String resourceGroupName, + String resourceName, String networkSecurityPerimeterConfigurationName) { + return beginReconcileAsync(resourceGroupName, resourceName, networkSecurityPerimeterConfigurationName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Reconcile the specified Network Security Perimeter configuration associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param networkSecurityPerimeterConfigurationName The resource association Name. Composed of parameter guid and + * association name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkSecurityPerimeterConfigurationInner reconcile(String resourceGroupName, String resourceName, + String networkSecurityPerimeterConfigurationName) { + return beginReconcile(resourceGroupName, resourceName, networkSecurityPerimeterConfigurationName) + .getFinalResult(); + } + + /** + * Reconcile the specified Network Security Perimeter configuration associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param networkSecurityPerimeterConfigurationName The resource association Name. Composed of parameter guid and + * association name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public NetworkSecurityPerimeterConfigurationInner reconcile(String resourceGroupName, String resourceName, + String networkSecurityPerimeterConfigurationName, Context context) { + return beginReconcile(resourceGroupName, resourceName, networkSecurityPerimeterConfigurationName, context) + .getFinalResult(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the List NetworkSecurityPerimeterConfiguration operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the List NetworkSecurityPerimeterConfiguration operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the List NetworkSecurityPerimeterConfiguration operation along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, + Context context) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/NetworkSecurityPerimeterConfigurationsImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/NetworkSecurityPerimeterConfigurationsImpl.java new file mode 100644 index 000000000000..2dbbe625f670 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/NetworkSecurityPerimeterConfigurationsImpl.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.botservice.fluent.NetworkSecurityPerimeterConfigurationsClient; +import com.azure.resourcemanager.botservice.fluent.models.NetworkSecurityPerimeterConfigurationInner; +import com.azure.resourcemanager.botservice.models.NetworkSecurityPerimeterConfiguration; +import com.azure.resourcemanager.botservice.models.NetworkSecurityPerimeterConfigurations; + +public final class NetworkSecurityPerimeterConfigurationsImpl implements NetworkSecurityPerimeterConfigurations { + private static final ClientLogger LOGGER = new ClientLogger(NetworkSecurityPerimeterConfigurationsImpl.class); + + private final NetworkSecurityPerimeterConfigurationsClient innerClient; + + private final com.azure.resourcemanager.botservice.BotServiceManager serviceManager; + + public NetworkSecurityPerimeterConfigurationsImpl(NetworkSecurityPerimeterConfigurationsClient innerClient, + com.azure.resourcemanager.botservice.BotServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, + String resourceName, String networkSecurityPerimeterConfigurationName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, resourceName, networkSecurityPerimeterConfigurationName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new NetworkSecurityPerimeterConfigurationImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public NetworkSecurityPerimeterConfiguration get(String resourceGroupName, String resourceName, + String networkSecurityPerimeterConfigurationName) { + NetworkSecurityPerimeterConfigurationInner inner + = this.serviceClient().get(resourceGroupName, resourceName, networkSecurityPerimeterConfigurationName); + if (inner != null) { + return new NetworkSecurityPerimeterConfigurationImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable list(String resourceGroupName, String resourceName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, resourceName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new NetworkSecurityPerimeterConfigurationImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String resourceName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, resourceName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new NetworkSecurityPerimeterConfigurationImpl(inner1, this.manager())); + } + + public NetworkSecurityPerimeterConfiguration reconcile(String resourceGroupName, String resourceName, + String networkSecurityPerimeterConfigurationName) { + NetworkSecurityPerimeterConfigurationInner inner = this.serviceClient() + .reconcile(resourceGroupName, resourceName, networkSecurityPerimeterConfigurationName); + if (inner != null) { + return new NetworkSecurityPerimeterConfigurationImpl(inner, this.manager()); + } else { + return null; + } + } + + public NetworkSecurityPerimeterConfiguration reconcile(String resourceGroupName, String resourceName, + String networkSecurityPerimeterConfigurationName, Context context) { + NetworkSecurityPerimeterConfigurationInner inner = this.serviceClient() + .reconcile(resourceGroupName, resourceName, networkSecurityPerimeterConfigurationName, context); + if (inner != null) { + return new NetworkSecurityPerimeterConfigurationImpl(inner, this.manager()); + } else { + return null; + } + } + + private NetworkSecurityPerimeterConfigurationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.botservice.BotServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/OperationEntityImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/OperationEntityImpl.java index a44a2da5ca70..9db5194b294d 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/OperationEntityImpl.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/OperationEntityImpl.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.implementation; +import com.azure.core.util.BinaryData; import com.azure.resourcemanager.botservice.fluent.models.OperationEntityInner; import com.azure.resourcemanager.botservice.models.OperationDisplayInfo; import com.azure.resourcemanager.botservice.models.OperationEntity; @@ -31,7 +32,7 @@ public String origin() { return this.innerModel().origin(); } - public Object properties() { + public BinaryData properties() { return this.innerModel().properties(); } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/OperationResultsClientImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/OperationResultsClientImpl.java new file mode 100644 index 000000000000..bc2cabf6feb6 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/OperationResultsClientImpl.java @@ -0,0 +1,232 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.botservice.fluent.OperationResultsClient; +import com.azure.resourcemanager.botservice.fluent.models.OperationResultsDescriptionInner; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in OperationResultsClient. + */ +public final class OperationResultsClientImpl implements OperationResultsClient { + /** + * The proxy service used to perform REST calls. + */ + private final OperationResultsService service; + + /** + * The service client containing this operation class. + */ + private final BotServiceManagementClientImpl client; + + /** + * Initializes an instance of OperationResultsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OperationResultsClientImpl(BotServiceManagementClientImpl client) { + this.service + = RestProxy.create(OperationResultsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for BotServiceManagementClientOperationResults to be used by the proxy + * service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "BotServiceManagementClientOperationResults") + public interface OperationResultsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.BotService/operationresults/{operationResultId}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("operationResultId") String operationResultId, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.BotService/operationresults/{operationResultId}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("operationResultId") String operationResultId, @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Get the operation result for a long running operation. + * + * @param operationResultId The ID of the operation result to get. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation result for a long running operation along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> getWithResponseAsync(String operationResultId) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), operationResultId, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the operation result for a long running operation. + * + * @param operationResultId The ID of the operation result to get. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation result for a long running operation along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response getWithResponse(String operationResultId) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + operationResultId, accept, Context.NONE); + } + + /** + * Get the operation result for a long running operation. + * + * @param operationResultId The ID of the operation result to get. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation result for a long running operation along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Response getWithResponse(String operationResultId, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + operationResultId, accept, context); + } + + /** + * Get the operation result for a long running operation. + * + * @param operationResultId The ID of the operation result to get. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the operation result for a long running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, OperationResultsDescriptionInner> + beginGetAsync(String operationResultId) { + Mono>> mono = getWithResponseAsync(operationResultId); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), OperationResultsDescriptionInner.class, + OperationResultsDescriptionInner.class, this.client.getContext()); + } + + /** + * Get the operation result for a long running operation. + * + * @param operationResultId The ID of the operation result to get. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the operation result for a long running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationResultsDescriptionInner> + beginGet(String operationResultId) { + Response response = getWithResponse(operationResultId); + return this.client.getLroResult(response, + OperationResultsDescriptionInner.class, OperationResultsDescriptionInner.class, Context.NONE); + } + + /** + * Get the operation result for a long running operation. + * + * @param operationResultId The ID of the operation result to get. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the operation result for a long running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, OperationResultsDescriptionInner> + beginGet(String operationResultId, Context context) { + Response response = getWithResponse(operationResultId, context); + return this.client.getLroResult(response, + OperationResultsDescriptionInner.class, OperationResultsDescriptionInner.class, context); + } + + /** + * Get the operation result for a long running operation. + * + * @param operationResultId The ID of the operation result to get. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation result for a long running operation on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String operationResultId) { + return beginGetAsync(operationResultId).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Get the operation result for a long running operation. + * + * @param operationResultId The ID of the operation result to get. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation result for a long running operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationResultsDescriptionInner get(String operationResultId) { + return beginGet(operationResultId).getFinalResult(); + } + + /** + * Get the operation result for a long running operation. + * + * @param operationResultId The ID of the operation result to get. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation result for a long running operation. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationResultsDescriptionInner get(String operationResultId, Context context) { + return beginGet(operationResultId, context).getFinalResult(); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/OperationResultsDescriptionImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/OperationResultsDescriptionImpl.java new file mode 100644 index 000000000000..728067bfadd3 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/OperationResultsDescriptionImpl.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.implementation; + +import com.azure.resourcemanager.botservice.fluent.models.OperationResultsDescriptionInner; +import com.azure.resourcemanager.botservice.models.OperationResultStatus; +import com.azure.resourcemanager.botservice.models.OperationResultsDescription; +import java.time.OffsetDateTime; + +public final class OperationResultsDescriptionImpl implements OperationResultsDescription { + private OperationResultsDescriptionInner innerObject; + + private final com.azure.resourcemanager.botservice.BotServiceManager serviceManager; + + OperationResultsDescriptionImpl(OperationResultsDescriptionInner innerObject, + com.azure.resourcemanager.botservice.BotServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public OperationResultStatus status() { + return this.innerModel().status(); + } + + public OffsetDateTime startTime() { + return this.innerModel().startTime(); + } + + public OperationResultsDescriptionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.botservice.BotServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/OperationResultsImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/OperationResultsImpl.java new file mode 100644 index 000000000000..c0c07ab6083d --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/OperationResultsImpl.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.implementation; + +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.botservice.fluent.OperationResultsClient; +import com.azure.resourcemanager.botservice.fluent.models.OperationResultsDescriptionInner; +import com.azure.resourcemanager.botservice.models.OperationResults; +import com.azure.resourcemanager.botservice.models.OperationResultsDescription; + +public final class OperationResultsImpl implements OperationResults { + private static final ClientLogger LOGGER = new ClientLogger(OperationResultsImpl.class); + + private final OperationResultsClient innerClient; + + private final com.azure.resourcemanager.botservice.BotServiceManager serviceManager; + + public OperationResultsImpl(OperationResultsClient innerClient, + com.azure.resourcemanager.botservice.BotServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public OperationResultsDescription get(String operationResultId) { + OperationResultsDescriptionInner inner = this.serviceClient().get(operationResultId); + if (inner != null) { + return new OperationResultsDescriptionImpl(inner, this.manager()); + } else { + return null; + } + } + + public OperationResultsDescription get(String operationResultId, Context context) { + OperationResultsDescriptionInner inner = this.serviceClient().get(operationResultId, context); + if (inner != null) { + return new OperationResultsDescriptionImpl(inner, this.manager()); + } else { + return null; + } + } + + private OperationResultsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.botservice.BotServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/OperationsClientImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/OperationsClientImpl.java index d2a6ed47d871..d18a96ad154a 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/OperationsClientImpl.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/OperationsClientImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.implementation; @@ -27,7 +27,7 @@ import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.botservice.fluent.OperationsClient; import com.azure.resourcemanager.botservice.fluent.models.OperationEntityInner; -import com.azure.resourcemanager.botservice.models.OperationEntityListResult; +import com.azure.resourcemanager.botservice.implementation.models.OperationEntityListResult; import reactor.core.publisher.Mono; /** @@ -42,31 +42,38 @@ public final class OperationsClientImpl implements OperationsClient { /** * The service client containing this operation class. */ - private final AzureBotServiceImpl client; + private final BotServiceManagementClientImpl client; /** * Initializes an instance of OperationsClientImpl. * * @param client the instance of the service client containing this operation class. */ - OperationsClientImpl(AzureBotServiceImpl client) { + OperationsClientImpl(BotServiceManagementClientImpl client) { this.service = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for AzureBotServiceOperations to be used by the proxy service to perform - * REST calls. + * The interface defining all the services for BotServiceManagementClientOperations to be used by the proxy service + * to perform REST calls. */ - @Host("{$host}") - @ServiceInterface(name = "AzureBotServiceOpera") + @Host("{endpoint}") + @ServiceInterface(name = "BotServiceManagementClientOperations") public interface OperationsService { @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.BotService/operations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/providers/Microsoft.BotService/operations") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @Headers({ "Content-Type: application/json" }) @@ -74,12 +81,19 @@ Mono> list(@HostParam("$host") String endpoi @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Lists all the available BotService operations. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -88,10 +102,6 @@ Mono> listNext( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil .withContext( @@ -102,57 +112,53 @@ private Mono> listSinglePageAsync() { } /** - * Lists all the available BotService operations. + * List the operations for the provider. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the list of bot service operation response as paginated response with {@link PagedFlux}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); } /** - * Lists all the available BotService operations. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service operation response as paginated response with {@link PagedFlux}. + * @return the list of bot service operation response along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage() { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Lists all the available BotService operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service operation response as paginated response with {@link PagedFlux}. + * @return the list of bot service operation response along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } /** - * Lists all the available BotService operations. + * List the operations for the provider. * * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -160,11 +166,11 @@ private PagedFlux listAsync(Context context) { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { - return new PagedIterable<>(listAsync()); + return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink)); } /** - * Lists all the available BotService operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -174,7 +180,7 @@ public PagedIterable list() { */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); + return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context)); } /** @@ -189,13 +195,6 @@ public PagedIterable list(Context context) { */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } final String accept = "application/json"; return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) .>map(res -> new PagedResponseBase<>(res.getRequest(), @@ -203,6 +202,24 @@ private Mono> listNextSinglePageAsync(String .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of bot service operation response along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + /** * Get the next page of items. * @@ -211,22 +228,14 @@ private Mono> listNextSinglePageAsync(String * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service operation response along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * @return the list of bot service operation response along with {@link PagedResponse}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } + private PagedResponse listNextSinglePage(String nextLink, Context context) { final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/OperationsImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/OperationsImpl.java index 1c7045c83808..b455e5f59c0c 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/OperationsImpl.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/OperationsImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.implementation; diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateEndpointConnectionImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateEndpointConnectionImpl.java new file mode 100644 index 000000000000..e8fc0da12680 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateEndpointConnectionImpl.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.botservice.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.botservice.models.PrivateEndpoint; +import com.azure.resourcemanager.botservice.models.PrivateEndpointConnection; +import com.azure.resourcemanager.botservice.models.PrivateEndpointConnectionProvisioningState; +import com.azure.resourcemanager.botservice.models.PrivateLinkServiceConnectionState; +import java.util.Collections; +import java.util.List; + +public final class PrivateEndpointConnectionImpl + implements PrivateEndpointConnection, PrivateEndpointConnection.Definition { + private PrivateEndpointConnectionInner innerObject; + + private final com.azure.resourcemanager.botservice.BotServiceManager serviceManager; + + PrivateEndpointConnectionImpl(PrivateEndpointConnectionInner innerObject, + com.azure.resourcemanager.botservice.BotServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public PrivateEndpoint privateEndpoint() { + return this.innerModel().privateEndpoint(); + } + + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.innerModel().privateLinkServiceConnectionState(); + } + + public PrivateEndpointConnectionProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public List groupIds() { + List inner = this.innerModel().groupIds(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public PrivateEndpointConnectionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.botservice.BotServiceManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String resourceName; + + private String privateEndpointConnectionName; + + public PrivateEndpointConnectionImpl withExistingBotService(String resourceGroupName, String resourceName) { + this.resourceGroupName = resourceGroupName; + this.resourceName = resourceName; + return this; + } + + public PrivateEndpointConnection create() { + this.innerObject = serviceManager.serviceClient() + .getPrivateEndpointConnections() + .createWithResponse(resourceGroupName, resourceName, privateEndpointConnectionName, this.innerModel(), + Context.NONE) + .getValue(); + return this; + } + + public PrivateEndpointConnection create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getPrivateEndpointConnections() + .createWithResponse(resourceGroupName, resourceName, privateEndpointConnectionName, this.innerModel(), + context) + .getValue(); + return this; + } + + PrivateEndpointConnectionImpl(String name, com.azure.resourcemanager.botservice.BotServiceManager serviceManager) { + this.innerObject = new PrivateEndpointConnectionInner(); + this.serviceManager = serviceManager; + this.privateEndpointConnectionName = name; + } + + public PrivateEndpointConnection refresh() { + this.innerObject = serviceManager.serviceClient() + .getPrivateEndpointConnections() + .getWithResponse(resourceGroupName, resourceName, privateEndpointConnectionName, Context.NONE) + .getValue(); + return this; + } + + public PrivateEndpointConnection refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getPrivateEndpointConnections() + .getWithResponse(resourceGroupName, resourceName, privateEndpointConnectionName, context) + .getValue(); + return this; + } + + public PrivateEndpointConnectionImpl withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + this.innerModel().withPrivateEndpoint(privateEndpoint); + return this; + } + + public PrivateEndpointConnectionImpl + withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + this.innerModel().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); + return this; + } + + public PrivateEndpointConnectionImpl withGroupIds(List groupIds) { + this.innerModel().withGroupIds(groupIds); + return this; + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateEndpointConnectionsClientImpl.java new file mode 100644 index 000000000000..ee6d91b96974 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateEndpointConnectionsClientImpl.java @@ -0,0 +1,587 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.botservice.fluent.PrivateEndpointConnectionsClient; +import com.azure.resourcemanager.botservice.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.botservice.implementation.models.PrivateEndpointConnectionListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. + */ +public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpointConnectionsClient { + /** + * The proxy service used to perform REST calls. + */ + private final PrivateEndpointConnectionsService service; + + /** + * The service client containing this operation class. + */ + private final BotServiceManagementClientImpl client; + + /** + * Initializes an instance of PrivateEndpointConnectionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PrivateEndpointConnectionsClientImpl(BotServiceManagementClientImpl client) { + this.service = RestProxy.create(PrivateEndpointConnectionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for BotServiceManagementClientPrivateEndpointConnections to be used by + * the proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "BotServiceManagementClientPrivateEndpointConnections") + public interface PrivateEndpointConnectionsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @HeaderParam("Accept") String accept, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> create(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PrivateEndpointConnectionInner properties, Context context); + + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response createSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") PrivateEndpointConnectionInner properties, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> delete(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, Context context); + + @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response deleteSync(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/privateEndpointConnections") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/privateEndpointConnections") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listNextSync( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the specified private endpoint connection associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified private endpoint connection associated with the Bot along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String resourceName, String privateEndpointConnectionName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, privateEndpointConnectionName, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the specified private endpoint connection associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified private endpoint connection associated with the Bot on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String resourceName, + String privateEndpointConnectionName) { + return getWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the specified private endpoint connection associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified private endpoint connection associated with the Bot along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String resourceName, + String privateEndpointConnectionName, Context context) { + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, privateEndpointConnectionName, accept, context); + } + + /** + * Gets the specified private endpoint connection associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified private endpoint connection associated with the Bot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionInner get(String resourceGroupName, String resourceName, + String privateEndpointConnectionName) { + return getWithResponse(resourceGroupName, resourceName, privateEndpointConnectionName, Context.NONE).getValue(); + } + + /** + * Update the state of specified private endpoint connection associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param properties The private endpoint connection properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createWithResponseAsync(String resourceGroupName, + String resourceName, String privateEndpointConnectionName, PrivateEndpointConnectionInner properties) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, privateEndpointConnectionName, + contentType, accept, properties, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update the state of specified private endpoint connection associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param properties The private endpoint connection properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync(String resourceGroupName, String resourceName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner properties) { + return createWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName, properties) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update the state of specified private endpoint connection associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param properties The private endpoint connection properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createWithResponse(String resourceGroupName, String resourceName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner properties, Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.createSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, privateEndpointConnectionName, + contentType, accept, properties, context); + } + + /** + * Update the state of specified private endpoint connection associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param properties The private endpoint connection properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionInner create(String resourceGroupName, String resourceName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner properties) { + return createWithResponse(resourceGroupName, resourceName, privateEndpointConnectionName, properties, + Context.NONE).getValue(); + } + + /** + * Deletes the specified private endpoint connection associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String resourceGroupName, String resourceName, + String privateEndpointConnectionName) { + return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, privateEndpointConnectionName, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Deletes the specified private endpoint connection associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String resourceName, + String privateEndpointConnectionName) { + return deleteWithResponseAsync(resourceGroupName, resourceName, privateEndpointConnectionName) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Deletes the specified private endpoint connection associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String resourceGroupName, String resourceName, + String privateEndpointConnectionName, Context context) { + return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, privateEndpointConnectionName, context); + } + + /** + * Deletes the specified private endpoint connection associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String resourceName, String privateEndpointConnectionName) { + deleteWithResponse(resourceGroupName, resourceName, privateEndpointConnectionName, Context.NONE); + } + + /** + * List all the private endpoint connections associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String resourceName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all the private endpoint connections associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account as paginated response + * with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String resourceName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, resourceName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List all the private endpoint connections associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account along with + * {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, + String resourceName) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all the private endpoint connections associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account along with + * {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listSinglePage(String resourceGroupName, String resourceName, + Context context) { + final String accept = "application/json"; + Response res + = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, resourceName, accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * List all the private endpoint connections associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account as paginated response + * with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String resourceName) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, resourceName), + nextLink -> listNextSinglePage(nextLink)); + } + + /** + * List all the private endpoint connections associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account as paginated response + * with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String resourceName, + Context context) { + return new PagedIterable<>(() -> listSinglePage(resourceGroupName, resourceName, context), + nextLink -> listNextSinglePage(nextLink, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account along with + * {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account along with + * {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PagedResponse listNextSinglePage(String nextLink, Context context) { + final String accept = "application/json"; + Response res + = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context); + return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), + res.getValue().nextLink(), null); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateEndpointConnectionsImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateEndpointConnectionsImpl.java new file mode 100644 index 000000000000..5ad05e6029d1 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateEndpointConnectionsImpl.java @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.botservice.fluent.PrivateEndpointConnectionsClient; +import com.azure.resourcemanager.botservice.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.botservice.models.PrivateEndpointConnection; +import com.azure.resourcemanager.botservice.models.PrivateEndpointConnections; + +public final class PrivateEndpointConnectionsImpl implements PrivateEndpointConnections { + private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionsImpl.class); + + private final PrivateEndpointConnectionsClient innerClient; + + private final com.azure.resourcemanager.botservice.BotServiceManager serviceManager; + + public PrivateEndpointConnectionsImpl(PrivateEndpointConnectionsClient innerClient, + com.azure.resourcemanager.botservice.BotServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String resourceName, + String privateEndpointConnectionName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, resourceName, privateEndpointConnectionName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PrivateEndpointConnectionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PrivateEndpointConnection get(String resourceGroupName, String resourceName, + String privateEndpointConnectionName) { + PrivateEndpointConnectionInner inner + = this.serviceClient().get(resourceGroupName, resourceName, privateEndpointConnectionName); + if (inner != null) { + return new PrivateEndpointConnectionImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteWithResponse(String resourceGroupName, String resourceName, + String privateEndpointConnectionName, Context context) { + return this.serviceClient() + .deleteWithResponse(resourceGroupName, resourceName, privateEndpointConnectionName, context); + } + + public void delete(String resourceGroupName, String resourceName, String privateEndpointConnectionName) { + this.serviceClient().delete(resourceGroupName, resourceName, privateEndpointConnectionName); + } + + public PagedIterable list(String resourceGroupName, String resourceName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, resourceName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String resourceName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, resourceName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); + } + + public PrivateEndpointConnection getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "botServices"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'botServices'.", id))); + } + String privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); + if (privateEndpointConnectionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); + } + return this.getWithResponse(resourceGroupName, resourceName, privateEndpointConnectionName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "botServices"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'botServices'.", id))); + } + String privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); + if (privateEndpointConnectionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); + } + return this.getWithResponse(resourceGroupName, resourceName, privateEndpointConnectionName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "botServices"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'botServices'.", id))); + } + String privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); + if (privateEndpointConnectionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); + } + this.deleteWithResponse(resourceGroupName, resourceName, privateEndpointConnectionName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String resourceName = ResourceManagerUtils.getValueFromIdByName(id, "botServices"); + if (resourceName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'botServices'.", id))); + } + String privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); + if (privateEndpointConnectionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); + } + return this.deleteWithResponse(resourceGroupName, resourceName, privateEndpointConnectionName, context); + } + + private PrivateEndpointConnectionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.botservice.BotServiceManager manager() { + return this.serviceManager; + } + + public PrivateEndpointConnectionImpl define(String name) { + return new PrivateEndpointConnectionImpl(name, this.manager()); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateLinkResourceListResultImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateLinkResourceListResultImpl.java new file mode 100644 index 000000000000..106f95d9d3c6 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateLinkResourceListResultImpl.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.implementation; + +import com.azure.resourcemanager.botservice.fluent.models.PrivateLinkResourceListResultInner; +import com.azure.resourcemanager.botservice.models.PrivateLinkResource; +import com.azure.resourcemanager.botservice.models.PrivateLinkResourceListResult; +import java.util.Collections; +import java.util.List; + +public final class PrivateLinkResourceListResultImpl implements PrivateLinkResourceListResult { + private PrivateLinkResourceListResultInner innerObject; + + private final com.azure.resourcemanager.botservice.BotServiceManager serviceManager; + + PrivateLinkResourceListResultImpl(PrivateLinkResourceListResultInner innerObject, + com.azure.resourcemanager.botservice.BotServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List value() { + List inner = this.innerModel().value(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public PrivateLinkResourceListResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.botservice.BotServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateLinkResourcesClientImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateLinkResourcesClientImpl.java new file mode 100644 index 000000000000..f9f22289c164 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateLinkResourcesClientImpl.java @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.botservice.fluent.PrivateLinkResourcesClient; +import com.azure.resourcemanager.botservice.fluent.models.PrivateLinkResourceListResultInner; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. + */ +public final class PrivateLinkResourcesClientImpl implements PrivateLinkResourcesClient { + /** + * The proxy service used to perform REST calls. + */ + private final PrivateLinkResourcesService service; + + /** + * The service client containing this operation class. + */ + private final BotServiceManagementClientImpl client; + + /** + * Initializes an instance of PrivateLinkResourcesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PrivateLinkResourcesClientImpl(BotServiceManagementClientImpl client) { + this.service = RestProxy.create(PrivateLinkResourcesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for BotServiceManagementClientPrivateLinkResources to be used by the + * proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "BotServiceManagementClientPrivateLinkResources") + public interface PrivateLinkResourcesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/privateLinkResources") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByBotResource(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/privateLinkResources") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response listByBotResourceSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("resourceName") String resourceName, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the private link resources that need to be created for a Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private link resources that need to be created for a Bot along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByBotResourceWithResponseAsync(String resourceGroupName, String resourceName) { + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByBotResource(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the private link resources that need to be created for a Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private link resources that need to be created for a Bot on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listByBotResourceAsync(String resourceGroupName, + String resourceName) { + return listByBotResourceWithResponseAsync(resourceGroupName, resourceName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the private link resources that need to be created for a Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private link resources that need to be created for a Bot along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listByBotResourceWithResponse(String resourceGroupName, + String resourceName, Context context) { + final String accept = "application/json"; + return service.listByBotResourceSync(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context); + } + + /** + * Gets the private link resources that need to be created for a Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private link resources that need to be created for a Bot. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateLinkResourceListResultInner listByBotResource(String resourceGroupName, String resourceName) { + return listByBotResourceWithResponse(resourceGroupName, resourceName, Context.NONE).getValue(); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateLinkResourcesImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateLinkResourcesImpl.java new file mode 100644 index 000000000000..3c3e36bfec7b --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateLinkResourcesImpl.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.botservice.fluent.PrivateLinkResourcesClient; +import com.azure.resourcemanager.botservice.fluent.models.PrivateLinkResourceListResultInner; +import com.azure.resourcemanager.botservice.models.PrivateLinkResourceListResult; +import com.azure.resourcemanager.botservice.models.PrivateLinkResources; + +public final class PrivateLinkResourcesImpl implements PrivateLinkResources { + private static final ClientLogger LOGGER = new ClientLogger(PrivateLinkResourcesImpl.class); + + private final PrivateLinkResourcesClient innerClient; + + private final com.azure.resourcemanager.botservice.BotServiceManager serviceManager; + + public PrivateLinkResourcesImpl(PrivateLinkResourcesClient innerClient, + com.azure.resourcemanager.botservice.BotServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response listByBotResourceWithResponse(String resourceGroupName, + String resourceName, Context context) { + Response inner + = this.serviceClient().listByBotResourceWithResponse(resourceGroupName, resourceName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PrivateLinkResourceListResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PrivateLinkResourceListResult listByBotResource(String resourceGroupName, String resourceName) { + PrivateLinkResourceListResultInner inner + = this.serviceClient().listByBotResource(resourceGroupName, resourceName); + if (inner != null) { + return new PrivateLinkResourceListResultImpl(inner, this.manager()); + } else { + return null; + } + } + + private PrivateLinkResourcesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.botservice.BotServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/QnAMakerEndpointKeysClientImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/QnAMakerEndpointKeysClientImpl.java new file mode 100644 index 000000000000..8beb243588f1 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/QnAMakerEndpointKeysClientImpl.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.botservice.fluent.QnAMakerEndpointKeysClient; +import com.azure.resourcemanager.botservice.fluent.models.QnAMakerEndpointKeysResponseInner; +import com.azure.resourcemanager.botservice.models.QnAMakerEndpointKeysRequestBody; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in QnAMakerEndpointKeysClient. + */ +public final class QnAMakerEndpointKeysClientImpl implements QnAMakerEndpointKeysClient { + /** + * The proxy service used to perform REST calls. + */ + private final QnAMakerEndpointKeysService service; + + /** + * The service client containing this operation class. + */ + private final BotServiceManagementClientImpl client; + + /** + * Initializes an instance of QnAMakerEndpointKeysClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + QnAMakerEndpointKeysClientImpl(BotServiceManagementClientImpl client) { + this.service = RestProxy.create(QnAMakerEndpointKeysService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for BotServiceManagementClientQnAMakerEndpointKeys to be used by the + * proxy service to perform REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "BotServiceManagementClientQnAMakerEndpointKeys") + public interface QnAMakerEndpointKeysService { + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.BotService/listQnAMakerEndpointKeys") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") QnAMakerEndpointKeysRequestBody parameters, Context context); + + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.BotService/listQnAMakerEndpointKeys") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Response getSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept, + @BodyParam("application/json") QnAMakerEndpointKeysRequestBody parameters, Context context); + } + + /** + * Lists the QnA Maker endpoint keys. + * + * @param parameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schema for EndpointKeys generate/refresh operations along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + getWithResponseAsync(QnAMakerEndpointKeysRequestBody parameters) { + final String contentType = "application/json"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), contentType, accept, parameters, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Lists the QnA Maker endpoint keys. + * + * @param parameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schema for EndpointKeys generate/refresh operations on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(QnAMakerEndpointKeysRequestBody parameters) { + return getWithResponseAsync(parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Lists the QnA Maker endpoint keys. + * + * @param parameters The request body. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schema for EndpointKeys generate/refresh operations along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(QnAMakerEndpointKeysRequestBody parameters, + Context context) { + final String contentType = "application/json"; + final String accept = "application/json"; + return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + contentType, accept, parameters, context); + } + + /** + * Lists the QnA Maker endpoint keys. + * + * @param parameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schema for EndpointKeys generate/refresh operations. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public QnAMakerEndpointKeysResponseInner get(QnAMakerEndpointKeysRequestBody parameters) { + return getWithResponse(parameters, Context.NONE).getValue(); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/QnAMakerEndpointKeysImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/QnAMakerEndpointKeysImpl.java new file mode 100644 index 000000000000..dfdff4085955 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/QnAMakerEndpointKeysImpl.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.botservice.fluent.QnAMakerEndpointKeysClient; +import com.azure.resourcemanager.botservice.fluent.models.QnAMakerEndpointKeysResponseInner; +import com.azure.resourcemanager.botservice.models.QnAMakerEndpointKeys; +import com.azure.resourcemanager.botservice.models.QnAMakerEndpointKeysRequestBody; +import com.azure.resourcemanager.botservice.models.QnAMakerEndpointKeysResponse; + +public final class QnAMakerEndpointKeysImpl implements QnAMakerEndpointKeys { + private static final ClientLogger LOGGER = new ClientLogger(QnAMakerEndpointKeysImpl.class); + + private final QnAMakerEndpointKeysClient innerClient; + + private final com.azure.resourcemanager.botservice.BotServiceManager serviceManager; + + public QnAMakerEndpointKeysImpl(QnAMakerEndpointKeysClient innerClient, + com.azure.resourcemanager.botservice.BotServiceManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(QnAMakerEndpointKeysRequestBody parameters, + Context context) { + Response inner = this.serviceClient().getWithResponse(parameters, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new QnAMakerEndpointKeysResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public QnAMakerEndpointKeysResponse get(QnAMakerEndpointKeysRequestBody parameters) { + QnAMakerEndpointKeysResponseInner inner = this.serviceClient().get(parameters); + if (inner != null) { + return new QnAMakerEndpointKeysResponseImpl(inner, this.manager()); + } else { + return null; + } + } + + private QnAMakerEndpointKeysClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.botservice.BotServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/QnAMakerEndpointKeysResponseImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/QnAMakerEndpointKeysResponseImpl.java new file mode 100644 index 000000000000..dd929b1221b2 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/QnAMakerEndpointKeysResponseImpl.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.implementation; + +import com.azure.resourcemanager.botservice.fluent.models.QnAMakerEndpointKeysResponseInner; +import com.azure.resourcemanager.botservice.models.QnAMakerEndpointKeysResponse; + +public final class QnAMakerEndpointKeysResponseImpl implements QnAMakerEndpointKeysResponse { + private QnAMakerEndpointKeysResponseInner innerObject; + + private final com.azure.resourcemanager.botservice.BotServiceManager serviceManager; + + QnAMakerEndpointKeysResponseImpl(QnAMakerEndpointKeysResponseInner innerObject, + com.azure.resourcemanager.botservice.BotServiceManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String primaryEndpointKey() { + return this.innerModel().primaryEndpointKey(); + } + + public String secondaryEndpointKey() { + return this.innerModel().secondaryEndpointKey(); + } + + public String installedVersion() { + return this.innerModel().installedVersion(); + } + + public String lastStableVersion() { + return this.innerModel().lastStableVersion(); + } + + public QnAMakerEndpointKeysResponseInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.botservice.BotServiceManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/ResourceManagerUtils.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/ResourceManagerUtils.java index b24e355354ed..67ef6080990f 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/ResourceManagerUtils.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/ResourceManagerUtils.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.implementation; diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/ServiceProviderResponseListImpl.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/ServiceProviderResponseListImpl.java index a360af137c1b..cf52ba365a57 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/ServiceProviderResponseListImpl.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/ServiceProviderResponseListImpl.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.implementation; diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/BotResponseList.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/models/BotResponseList.java similarity index 65% rename from sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/BotResponseList.java rename to sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/models/BotResponseList.java index 5fe6e0e04b69..6402568b12e2 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/BotResponseList.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/models/BotResponseList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.botservice.models; +package com.azure.resourcemanager.botservice.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,46 +16,26 @@ /** * The list of bot service operation response. */ -@Fluent +@Immutable public final class BotResponseList implements JsonSerializable { /* - * The link used to get the next page of bot service resources. + * The Bot items on this page */ - private String nextLink; + private List value; /* - * Gets the list of bot service results and their properties. + * The link to the next page of items */ - private List value; + private String nextLink; /** * Creates an instance of BotResponseList class. */ - public BotResponseList() { - } - - /** - * Get the nextLink property: The link used to get the next page of bot service resources. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link used to get the next page of bot service resources. - * - * @param nextLink the nextLink value to set. - * @return the BotResponseList object itself. - */ - public BotResponseList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; + private BotResponseList() { } /** - * Get the value property: Gets the list of bot service results and their properties. + * Get the value property: The Bot items on this page. * * @return the value value. */ @@ -64,14 +44,12 @@ public List value() { } /** - * Validates the instance. + * Get the nextLink property: The link to the next page of items. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -90,6 +68,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of BotResponseList if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the BotResponseList. */ public static BotResponseList fromJson(JsonReader jsonReader) throws IOException { @@ -99,11 +78,11 @@ public static BotResponseList fromJson(JsonReader jsonReader) throws IOException String fieldName = reader.getFieldName(); reader.nextToken(); - if ("nextLink".equals(fieldName)) { - deserializedBotResponseList.nextLink = reader.getString(); - } else if ("value".equals(fieldName)) { + if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> BotInner.fromJson(reader1)); deserializedBotResponseList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedBotResponseList.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ChannelResponseList.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/models/ChannelResponseList.java similarity index 65% rename from sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ChannelResponseList.java rename to sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/models/ChannelResponseList.java index 858e5f0a8991..78b2adf39a32 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ChannelResponseList.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/models/ChannelResponseList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.botservice.models; +package com.azure.resourcemanager.botservice.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,46 +16,26 @@ /** * The list of bot service channel operation response. */ -@Fluent +@Immutable public final class ChannelResponseList implements JsonSerializable { /* - * The link used to get the next page of bot service channel resources. + * The BotChannel items on this page */ - private String nextLink; + private List value; /* - * Gets the list of bot service channel results and their properties. + * The link to the next page of items */ - private List value; + private String nextLink; /** * Creates an instance of ChannelResponseList class. */ - public ChannelResponseList() { - } - - /** - * Get the nextLink property: The link used to get the next page of bot service channel resources. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link used to get the next page of bot service channel resources. - * - * @param nextLink the nextLink value to set. - * @return the ChannelResponseList object itself. - */ - public ChannelResponseList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; + private ChannelResponseList() { } /** - * Get the value property: Gets the list of bot service channel results and their properties. + * Get the value property: The BotChannel items on this page. * * @return the value value. */ @@ -64,14 +44,12 @@ public List value() { } /** - * Validates the instance. + * Get the nextLink property: The link to the next page of items. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -90,6 +68,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ChannelResponseList if the JsonReader was pointing to an instance of it, or null if it was * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the ChannelResponseList. */ public static ChannelResponseList fromJson(JsonReader jsonReader) throws IOException { @@ -99,11 +78,11 @@ public static ChannelResponseList fromJson(JsonReader jsonReader) throws IOExcep String fieldName = reader.getFieldName(); reader.nextToken(); - if ("nextLink".equals(fieldName)) { - deserializedChannelResponseList.nextLink = reader.getString(); - } else if ("value".equals(fieldName)) { + if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> BotChannelInner.fromJson(reader1)); deserializedChannelResponseList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedChannelResponseList.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ConnectionSettingResponseList.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/models/ConnectionSettingResponseList.java similarity index 66% rename from sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ConnectionSettingResponseList.java rename to sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/models/ConnectionSettingResponseList.java index 090e3c0270e1..7874245eacbe 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ConnectionSettingResponseList.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/models/ConnectionSettingResponseList.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.botservice.models; +package com.azure.resourcemanager.botservice.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,46 +16,26 @@ /** * The list of bot service connection settings response. */ -@Fluent +@Immutable public final class ConnectionSettingResponseList implements JsonSerializable { /* - * The link used to get the next page of bot service connection setting resources. + * The ConnectionSetting items on this page */ - private String nextLink; + private List value; /* - * Gets the list of bot service connection settings and their properties. + * The link to the next page of items */ - private List value; + private String nextLink; /** * Creates an instance of ConnectionSettingResponseList class. */ - public ConnectionSettingResponseList() { - } - - /** - * Get the nextLink property: The link used to get the next page of bot service connection setting resources. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link used to get the next page of bot service connection setting resources. - * - * @param nextLink the nextLink value to set. - * @return the ConnectionSettingResponseList object itself. - */ - public ConnectionSettingResponseList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; + private ConnectionSettingResponseList() { } /** - * Get the value property: Gets the list of bot service connection settings and their properties. + * Get the value property: The ConnectionSetting items on this page. * * @return the value value. */ @@ -64,14 +44,12 @@ public List value() { } /** - * Validates the instance. + * Get the nextLink property: The link to the next page of items. * - * @throws IllegalArgumentException thrown if the instance is not valid. + * @return the nextLink value. */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } + public String nextLink() { + return this.nextLink; } /** @@ -90,6 +68,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of ConnectionSettingResponseList if the JsonReader was pointing to an instance of it, or null * if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the ConnectionSettingResponseList. */ public static ConnectionSettingResponseList fromJson(JsonReader jsonReader) throws IOException { @@ -100,12 +79,12 @@ public static ConnectionSettingResponseList fromJson(JsonReader jsonReader) thro String fieldName = reader.getFieldName(); reader.nextToken(); - if ("nextLink".equals(fieldName)) { - deserializedConnectionSettingResponseList.nextLink = reader.getString(); - } else if ("value".equals(fieldName)) { + if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> ConnectionSettingInner.fromJson(reader1)); deserializedConnectionSettingResponseList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedConnectionSettingResponseList.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/models/NetworkSecurityPerimeterConfigurationList.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/models/NetworkSecurityPerimeterConfigurationList.java new file mode 100644 index 000000000000..955ecb4f60a3 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/models/NetworkSecurityPerimeterConfigurationList.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.botservice.fluent.models.NetworkSecurityPerimeterConfigurationInner; +import java.io.IOException; +import java.util.List; + +/** + * Result of the List NetworkSecurityPerimeterConfiguration operation. + */ +@Immutable +public final class NetworkSecurityPerimeterConfigurationList + implements JsonSerializable { + /* + * The NetworkSecurityPerimeterConfiguration items on this page + */ + private List value; + + /* + * The link to the next page of items + */ + private String nextLink; + + /** + * Creates an instance of NetworkSecurityPerimeterConfigurationList class. + */ + private NetworkSecurityPerimeterConfigurationList() { + } + + /** + * Get the value property: The NetworkSecurityPerimeterConfiguration items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkSecurityPerimeterConfigurationList from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkSecurityPerimeterConfigurationList if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the NetworkSecurityPerimeterConfigurationList. + */ + public static NetworkSecurityPerimeterConfigurationList fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkSecurityPerimeterConfigurationList deserializedNetworkSecurityPerimeterConfigurationList + = new NetworkSecurityPerimeterConfigurationList(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> NetworkSecurityPerimeterConfigurationInner.fromJson(reader1)); + deserializedNetworkSecurityPerimeterConfigurationList.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedNetworkSecurityPerimeterConfigurationList.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkSecurityPerimeterConfigurationList; + }); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/OperationEntityListResult.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/models/OperationEntityListResult.java similarity index 70% rename from sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/OperationEntityListResult.java rename to sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/models/OperationEntityListResult.java index f65a10faabf6..1eeb40ff5aca 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/OperationEntityListResult.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/models/OperationEntityListResult.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. -package com.azure.resourcemanager.botservice.models; +package com.azure.resourcemanager.botservice.implementation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -16,7 +16,7 @@ /** * The list of bot service operation response. */ -@Fluent +@Immutable public final class OperationEntityListResult implements JsonSerializable { /* * The link used to get the next page of operations. @@ -31,7 +31,7 @@ public final class OperationEntityListResult implements JsonSerializable value() { return this.value; } - /** - * Set the value property: The list of operations. - * - * @param value the value value to set. - * @return the OperationEntityListResult object itself. - */ - public OperationEntityListResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nextLink", this.nextLink); jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); return jsonWriter.writeEndObject(); } @@ -102,6 +69,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of OperationEntityListResult if the JsonReader was pointing to an instance of it, or null if * it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the OperationEntityListResult. */ public static OperationEntityListResult fromJson(JsonReader jsonReader) throws IOException { @@ -111,12 +79,12 @@ public static OperationEntityListResult fromJson(JsonReader jsonReader) throws I String fieldName = reader.getFieldName(); reader.nextToken(); - if ("nextLink".equals(fieldName)) { - deserializedOperationEntityListResult.nextLink = reader.getString(); - } else if ("value".equals(fieldName)) { + if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> OperationEntityInner.fromJson(reader1)); deserializedOperationEntityListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedOperationEntityListResult.nextLink = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/models/PrivateEndpointConnectionListResult.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/models/PrivateEndpointConnectionListResult.java new file mode 100644 index 000000000000..6bc459f3233d --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/models/PrivateEndpointConnectionListResult.java @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.botservice.fluent.models.PrivateEndpointConnectionInner; +import java.io.IOException; +import java.util.List; + +/** + * List of private endpoint connection associated with the specified storage account. + */ +@Immutable +public final class PrivateEndpointConnectionListResult + implements JsonSerializable { + /* + * Array of private endpoint connections + */ + private List value; + + /* + * The link used to get the next page of private endpoint connections. + */ + private String nextLink; + + /** + * Creates an instance of PrivateEndpointConnectionListResult class. + */ + private PrivateEndpointConnectionListResult() { + } + + /** + * Get the value property: Array of private endpoint connections. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: The link used to get the next page of private endpoint connections. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeStringField("nextLink", this.nextLink); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateEndpointConnectionListResult from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateEndpointConnectionListResult if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PrivateEndpointConnectionListResult. + */ + public static PrivateEndpointConnectionListResult fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateEndpointConnectionListResult deserializedPrivateEndpointConnectionListResult + = new PrivateEndpointConnectionListResult(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("value".equals(fieldName)) { + List value + = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1)); + deserializedPrivateEndpointConnectionListResult.value = value; + } else if ("nextLink".equals(fieldName)) { + deserializedPrivateEndpointConnectionListResult.nextLink = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateEndpointConnectionListResult; + }); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/package-info.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/package-info.java index 71fb7a89bd62..9afaf25655ab 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/package-info.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/implementation/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the implementations for AzureBotService. + * Package containing the implementations for BotService. * Azure Bot Service is a platform for creating smart conversational agents. */ package com.azure.resourcemanager.botservice.implementation; diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/AccessMode.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/AccessMode.java new file mode 100644 index 000000000000..9ac5ac0713fa --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/AccessMode.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Access Mode of the resource association. + */ +public final class AccessMode extends ExpandableStringEnum { + /** + * Static value Enforced for AccessMode. + */ + public static final AccessMode ENFORCED = fromString("Enforced"); + + /** + * Static value Learning for AccessMode. + */ + public static final AccessMode LEARNING = fromString("Learning"); + + /** + * Static value Audit for AccessMode. + */ + public static final AccessMode AUDIT = fromString("Audit"); + + /** + * Creates a new instance of AccessMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AccessMode() { + } + + /** + * Creates or finds a AccessMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding AccessMode. + */ + public static AccessMode fromString(String name) { + return fromString(name, AccessMode.class); + } + + /** + * Gets known AccessMode values. + * + * @return known AccessMode values. + */ + public static Collection values() { + return values(AccessMode.class); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/AcsChatChannel.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/AcsChatChannel.java index 6ca732589f04..356e91440df1 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/AcsChatChannel.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/AcsChatChannel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -54,15 +54,6 @@ public AcsChatChannel withLocation(String location) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/AlexaChannel.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/AlexaChannel.java index b3c38eb9516a..03992302da08 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/AlexaChannel.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/AlexaChannel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -79,18 +79,6 @@ public AlexaChannel withLocation(String location) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/AlexaChannelProperties.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/AlexaChannelProperties.java index cd5832283d2c..c8395675587d 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/AlexaChannelProperties.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/AlexaChannelProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -101,21 +100,6 @@ public AlexaChannelProperties withIsEnabled(boolean isEnabled) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (alexaSkillId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property alexaSkillId in model AlexaChannelProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AlexaChannelProperties.class); - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Bot.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Bot.java index e748e4284f75..eb102c36b9b6 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Bot.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Bot.java @@ -1,10 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; import com.azure.core.management.Region; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.botservice.fluent.models.BotInner; import java.util.List; @@ -36,25 +37,25 @@ public interface Bot { String type(); /** - * Gets the location property: The geo-location where the resource lives. + * Gets the properties property: The set of properties specific to bot resource. * - * @return the location value. + * @return the properties value. */ - String location(); + BotProperties properties(); /** - * Gets the tags property: Resource tags. + * Gets the location property: Specifies the location of the resource. * - * @return the tags value. + * @return the location value. */ - Map tags(); + String location(); /** - * Gets the properties property: The set of properties specific to bot resource. + * Gets the tags property: Contains resource tags defined as key/value pairs. * - * @return the properties value. + * @return the tags value. */ - BotProperties properties(); + Map tags(); /** * Gets the sku property: Gets or sets the SKU of the resource. @@ -84,6 +85,13 @@ public interface Bot { */ List zones(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the region of the resource. * @@ -115,8 +123,8 @@ public interface Bot { /** * The entirety of the Bot definition. */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } /** @@ -126,28 +134,7 @@ interface DefinitionStages { /** * The first stage of the Bot definition. */ - interface Blank extends WithLocation { - } - - /** - * The stage of the Bot definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(String location); + interface Blank extends WithResourceGroup { } /** @@ -157,7 +144,7 @@ interface WithResourceGroup { /** * Specifies resourceGroupName. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ WithCreate withExistingResourceGroup(String resourceGroupName); @@ -167,7 +154,8 @@ interface WithResourceGroup { * The stage of the Bot definition which contains all the minimum required properties for the resource to be * created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProperties, + interface WithCreate + extends DefinitionStages.WithLocation, DefinitionStages.WithTags, DefinitionStages.WithProperties, DefinitionStages.WithSku, DefinitionStages.WithKind, DefinitionStages.WithEtag { /** * Executes the create request. @@ -185,14 +173,35 @@ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithPro Bot create(Context context); } + /** + * The stage of the Bot definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location Specifies the location of the resource. + * @return the next definition stage. + */ + WithCreate withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location Specifies the location of the resource. + * @return the next definition stage. + */ + WithCreate withRegion(String location); + } + /** * The stage of the Bot definition allowing to specify tags. */ interface WithTags { /** - * Specifies the tags property: Resource tags.. + * Specifies the tags property: Contains resource tags defined as key/value pairs.. * - * @param tags Resource tags. + * @param tags Contains resource tags defined as key/value pairs. * @return the next definition stage. */ WithCreate withTags(Map tags); @@ -242,7 +251,7 @@ interface WithKind { */ interface WithEtag { /** - * Specifies the etag property: Entity Tag. + * Specifies the etag property: Entity Tag.. * * @param etag Entity Tag. * @return the next definition stage. @@ -288,9 +297,9 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags.. + * Specifies the tags property: Contains resource tags defined as key/value pairs.. * - * @param tags Resource tags. + * @param tags Contains resource tags defined as key/value pairs. * @return the next definition stage. */ Update withTags(Map tags); @@ -340,7 +349,7 @@ interface WithKind { */ interface WithEtag { /** - * Specifies the etag property: Entity Tag. + * Specifies the etag property: Entity Tag.. * * @param etag Entity Tag. * @return the next definition stage. diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/BotChannel.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/BotChannel.java index eed6923c64ae..45716ab1054f 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/BotChannel.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/BotChannel.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.botservice.fluent.models.BotChannelInner; import java.util.List; import java.util.Map; @@ -34,25 +35,25 @@ public interface BotChannel { String type(); /** - * Gets the location property: The geo-location where the resource lives. + * Gets the properties property: The set of properties specific to bot channel resource. * - * @return the location value. + * @return the properties value. */ - String location(); + Channel properties(); /** - * Gets the tags property: Resource tags. + * Gets the location property: Specifies the location of the resource. * - * @return the tags value. + * @return the location value. */ - Map tags(); + String location(); /** - * Gets the properties property: The set of properties specific to bot channel resource. + * Gets the tags property: Contains resource tags defined as key/value pairs. * - * @return the properties value. + * @return the tags value. */ - Channel properties(); + Map tags(); /** * Gets the sku property: Gets or sets the SKU of the resource. @@ -82,6 +83,13 @@ public interface BotChannel { */ List zones(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the inner com.azure.resourcemanager.botservice.fluent.models.BotChannelInner object. * diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/BotConnections.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/BotConnections.java index d2796d276b0a..0dc2548ecfe2 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/BotConnections.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/BotConnections.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -13,132 +13,132 @@ */ public interface BotConnections { /** - * Lists the available Service Providers for creating Connection Settings. + * Get a Connection Setting registration for a Bot Service. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param connectionName The name of the Bot Service Connection Setting resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service providers response along with {@link Response}. + * @return a Connection Setting registration for a Bot Service along with {@link Response}. */ - Response listServiceProvidersWithResponse(Context context); + Response getWithResponse(String resourceGroupName, String resourceName, String connectionName, + Context context); /** - * Lists the available Service Providers for creating Connection Settings. + * Get a Connection Setting registration for a Bot Service. * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param connectionName The name of the Bot Service Connection Setting resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service providers response. + * @return a Connection Setting registration for a Bot Service. */ - ServiceProviderResponseList listServiceProviders(); + ConnectionSetting get(String resourceGroupName, String resourceName, String connectionName); /** - * Get a Connection Setting registration for a Bot Service. + * Deletes a Connection Setting registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param connectionName The name of the Bot Service Connection Setting resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Connection Setting registration for a Bot Service along with {@link Response}. + * @return the {@link Response}. */ - Response listWithSecretsWithResponse(String resourceGroupName, String resourceName, - String connectionName, Context context); + Response deleteWithResponse(String resourceGroupName, String resourceName, String connectionName, + Context context); /** - * Get a Connection Setting registration for a Bot Service. + * Deletes a Connection Setting registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param connectionName The name of the Bot Service Connection Setting resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Connection Setting registration for a Bot Service. */ - ConnectionSetting listWithSecrets(String resourceGroupName, String resourceName, String connectionName); + void delete(String resourceGroupName, String resourceName, String connectionName); /** - * Get a Connection Setting registration for a Bot Service. + * Returns all the Connection Settings registered to a particular BotService resource. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Connection Setting registration for a Bot Service along with {@link Response}. + * @return the list of bot service connection settings response as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String resourceName, String connectionName, - Context context); + PagedIterable listByBotService(String resourceGroupName, String resourceName); /** - * Get a Connection Setting registration for a Bot Service. + * Returns all the Connection Settings registered to a particular BotService resource. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. - * @param connectionName The name of the Bot Service Connection Setting resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Connection Setting registration for a Bot Service. + * @return the list of bot service connection settings response as paginated response with {@link PagedIterable}. */ - ConnectionSetting get(String resourceGroupName, String resourceName, String connectionName); + PagedIterable listByBotService(String resourceGroupName, String resourceName, Context context); /** - * Deletes a Connection Setting registration for a Bot Service. + * Get a Connection Setting registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param connectionName The name of the Bot Service Connection Setting resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return a Connection Setting registration for a Bot Service along with {@link Response}. */ - Response deleteWithResponse(String resourceGroupName, String resourceName, String connectionName, - Context context); + Response listWithSecretsWithResponse(String resourceGroupName, String resourceName, + String connectionName, Context context); /** - * Deletes a Connection Setting registration for a Bot Service. + * Get a Connection Setting registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param connectionName The name of the Bot Service Connection Setting resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Connection Setting registration for a Bot Service. */ - void delete(String resourceGroupName, String resourceName, String connectionName); + ConnectionSetting listWithSecrets(String resourceGroupName, String resourceName, String connectionName); /** - * Returns all the Connection Settings registered to a particular BotService resource. + * Lists the available Service Providers for creating Connection Settings. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service connection settings response as paginated response with {@link PagedIterable}. + * @return the list of bot service providers response along with {@link Response}. */ - PagedIterable listByBotService(String resourceGroupName, String resourceName); + Response listServiceProvidersWithResponse(Context context); /** - * Returns all the Connection Settings registered to a particular BotService resource. + * Lists the available Service Providers for creating Connection Settings. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service connection settings response as paginated response with {@link PagedIterable}. + * @return the list of bot service providers response. */ - PagedIterable listByBotService(String resourceGroupName, String resourceName, Context context); + ServiceProviderResponseList listServiceProviders(); /** * Get a Connection Setting registration for a Bot Service. diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/BotProperties.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/BotProperties.java index 46d79664905c..9caaa92b1223 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/BotProperties.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/BotProperties.java @@ -1,15 +1,16 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; +import com.azure.resourcemanager.botservice.fluent.models.NetworkSecurityPerimeterConfigurationInner; +import com.azure.resourcemanager.botservice.fluent.models.PrivateEndpointConnectionInner; import java.io.IOException; import java.util.List; import java.util.Map; @@ -77,7 +78,7 @@ public final class BotProperties implements JsonSerializable { /* * Microsoft App Managed Identity Resource Id for the bot */ - private String msaAppMsiResourceId; + private String msaAppMSIResourceId; /* * Collection of channels for which the bot is configured @@ -169,6 +170,16 @@ public final class BotProperties implements JsonSerializable { */ private String storageResourceId; + /* + * List of Private Endpoint Connections configured for the bot + */ + private List privateEndpointConnections; + + /* + * List of Network Security Perimeter configurations for the bot + */ + private List networkSecurityPerimeterConfigurations; + /* * The hint to browser (e.g. protocol handler) on how to open the bot for authoring */ @@ -405,22 +416,22 @@ public BotProperties withMsaAppTenantId(String msaAppTenantId) { } /** - * Get the msaAppMsiResourceId property: Microsoft App Managed Identity Resource Id for the bot. + * Get the msaAppMSIResourceId property: Microsoft App Managed Identity Resource Id for the bot. * - * @return the msaAppMsiResourceId value. + * @return the msaAppMSIResourceId value. */ - public String msaAppMsiResourceId() { - return this.msaAppMsiResourceId; + public String msaAppMSIResourceId() { + return this.msaAppMSIResourceId; } /** - * Set the msaAppMsiResourceId property: Microsoft App Managed Identity Resource Id for the bot. + * Set the msaAppMSIResourceId property: Microsoft App Managed Identity Resource Id for the bot. * - * @param msaAppMsiResourceId the msaAppMsiResourceId value to set. + * @param msaAppMSIResourceId the msaAppMSIResourceId value to set. * @return the BotProperties object itself. */ - public BotProperties withMsaAppMsiResourceId(String msaAppMsiResourceId) { - this.msaAppMsiResourceId = msaAppMsiResourceId; + public BotProperties withMsaAppMSIResourceId(String msaAppMSIResourceId) { + this.msaAppMSIResourceId = msaAppMSIResourceId; return this; } @@ -731,6 +742,25 @@ public BotProperties withStorageResourceId(String storageResourceId) { return this; } + /** + * Get the privateEndpointConnections property: List of Private Endpoint Connections configured for the bot. + * + * @return the privateEndpointConnections value. + */ + public List privateEndpointConnections() { + return this.privateEndpointConnections; + } + + /** + * Get the networkSecurityPerimeterConfigurations property: List of Network Security Perimeter configurations for + * the bot. + * + * @return the networkSecurityPerimeterConfigurations value. + */ + public List networkSecurityPerimeterConfigurations() { + return this.networkSecurityPerimeterConfigurations; + } + /** * Get the openWithHint property: The hint to browser (e.g. protocol handler) on how to open the bot for authoring. * @@ -800,28 +830,6 @@ public BotProperties withPublishingCredentials(String publishingCredentials) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (displayName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property displayName in model BotProperties")); - } - if (endpoint() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property endpoint in model BotProperties")); - } - if (msaAppId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property msaAppId in model BotProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BotProperties.class); - /** * {@inheritDoc} */ @@ -838,7 +846,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("manifestUrl", this.manifestUrl); jsonWriter.writeStringField("msaAppType", this.msaAppType == null ? null : this.msaAppType.toString()); jsonWriter.writeStringField("msaAppTenantId", this.msaAppTenantId); - jsonWriter.writeStringField("msaAppMSIResourceId", this.msaAppMsiResourceId); + jsonWriter.writeStringField("msaAppMSIResourceId", this.msaAppMSIResourceId); jsonWriter.writeStringField("developerAppInsightKey", this.developerAppInsightKey); jsonWriter.writeStringField("developerAppInsightsApiKey", this.developerAppInsightsApiKey); jsonWriter.writeStringField("developerAppInsightsApplicationId", this.developerAppInsightsApplicationId); @@ -900,7 +908,7 @@ public static BotProperties fromJson(JsonReader jsonReader) throws IOException { } else if ("msaAppTenantId".equals(fieldName)) { deserializedBotProperties.msaAppTenantId = reader.getString(); } else if ("msaAppMSIResourceId".equals(fieldName)) { - deserializedBotProperties.msaAppMsiResourceId = reader.getString(); + deserializedBotProperties.msaAppMSIResourceId = reader.getString(); } else if ("configuredChannels".equals(fieldName)) { List configuredChannels = reader.readArray(reader1 -> reader1.getString()); deserializedBotProperties.configuredChannels = configuredChannels; @@ -941,6 +949,15 @@ public static BotProperties fromJson(JsonReader jsonReader) throws IOException { deserializedBotProperties.schemaTransformationVersion = reader.getString(); } else if ("storageResourceId".equals(fieldName)) { deserializedBotProperties.storageResourceId = reader.getString(); + } else if ("privateEndpointConnections".equals(fieldName)) { + List privateEndpointConnections + = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1)); + deserializedBotProperties.privateEndpointConnections = privateEndpointConnections; + } else if ("networkSecurityPerimeterConfigurations".equals(fieldName)) { + List networkSecurityPerimeterConfigurations + = reader.readArray(reader1 -> NetworkSecurityPerimeterConfigurationInner.fromJson(reader1)); + deserializedBotProperties.networkSecurityPerimeterConfigurations + = networkSecurityPerimeterConfigurations; } else if ("openWithHint".equals(fieldName)) { deserializedBotProperties.openWithHint = reader.getString(); } else if ("appPasswordHint".equals(fieldName)) { diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Bots.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Bots.java index 68a9ca3130de..457c141788f8 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Bots.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Bots.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -13,58 +13,58 @@ */ public interface Bots { /** - * Deletes a Bot Service from the resource group. + * Returns a BotService specified by the parameters. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return bot resource definition along with {@link Response}. */ - Response deleteByResourceGroupWithResponse(String resourceGroupName, String resourceName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, Context context); /** - * Deletes a Bot Service from the resource group. + * Returns a BotService specified by the parameters. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bot resource definition. */ - void deleteByResourceGroup(String resourceGroupName, String resourceName); + Bot getByResourceGroup(String resourceGroupName, String resourceName); /** - * Returns a BotService specified by the parameters. + * Deletes a Bot Service from the resource group. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bot resource definition along with {@link Response}. + * @return the {@link Response}. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String resourceName, Context context); + Response deleteByResourceGroupWithResponse(String resourceGroupName, String resourceName, Context context); /** - * Returns a BotService specified by the parameters. + * Deletes a Bot Service from the resource group. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bot resource definition. */ - Bot getByResourceGroup(String resourceGroupName, String resourceName); + void deleteByResourceGroup(String resourceGroupName, String resourceName); /** * Returns all the resources of a particular type belonging to a resource group. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -75,7 +75,7 @@ public interface Bots { /** * Returns all the resources of a particular type belonging to a resource group. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -107,7 +107,7 @@ public interface Bots { /** * Check whether a bot name is available. * - * @param parameters The request body parameters to provide for the check name availability request. + * @param parameters The request body. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -121,7 +121,7 @@ public interface Bots { /** * Check whether a bot name is available. * - * @param parameters The request body parameters to provide for the check name availability request. + * @param parameters The request body. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Channel.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Channel.java index e24c078347d7..8a45b0f31ace 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Channel.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Channel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -111,14 +111,6 @@ public Channel withLocation(String location) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ChannelName.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ChannelName.java index c034ce93655b..d47acb63223e 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ChannelName.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ChannelName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ChannelSettings.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ChannelSettings.java index f788ffbc761e..1dc3b2eda018 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ChannelSettings.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ChannelSettings.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * Channel settings definition. */ -@Fluent +@Immutable public final class ChannelSettings implements JsonSerializable { /* * The extensionKey1 @@ -70,7 +70,7 @@ public final class ChannelSettings implements JsonSerializable /** * Creates an instance of ChannelSettings class. */ - public ChannelSettings() { + private ChannelSettings() { } /** @@ -82,17 +82,6 @@ public String extensionKey1() { return this.extensionKey1; } - /** - * Set the extensionKey1 property: The extensionKey1. - * - * @param extensionKey1 the extensionKey1 value to set. - * @return the ChannelSettings object itself. - */ - public ChannelSettings withExtensionKey1(String extensionKey1) { - this.extensionKey1 = extensionKey1; - return this; - } - /** * Get the extensionKey2 property: The extensionKey2. * @@ -102,17 +91,6 @@ public String extensionKey2() { return this.extensionKey2; } - /** - * Set the extensionKey2 property: The extensionKey2. - * - * @param extensionKey2 the extensionKey2 value to set. - * @return the ChannelSettings object itself. - */ - public ChannelSettings withExtensionKey2(String extensionKey2) { - this.extensionKey2 = extensionKey2; - return this; - } - /** * Get the sites property: The list of sites. * @@ -122,17 +100,6 @@ public List sites() { return this.sites; } - /** - * Set the sites property: The list of sites. - * - * @param sites the sites value to set. - * @return the ChannelSettings object itself. - */ - public ChannelSettings withSites(List sites) { - this.sites = sites; - return this; - } - /** * Get the channelId property: The channel id. * @@ -142,17 +109,6 @@ public String channelId() { return this.channelId; } - /** - * Set the channelId property: The channel id. - * - * @param channelId the channelId value to set. - * @return the ChannelSettings object itself. - */ - public ChannelSettings withChannelId(String channelId) { - this.channelId = channelId; - return this; - } - /** * Get the channelDisplayName property: The channel display name. * @@ -162,17 +118,6 @@ public String channelDisplayName() { return this.channelDisplayName; } - /** - * Set the channelDisplayName property: The channel display name. - * - * @param channelDisplayName the channelDisplayName value to set. - * @return the ChannelSettings object itself. - */ - public ChannelSettings withChannelDisplayName(String channelDisplayName) { - this.channelDisplayName = channelDisplayName; - return this; - } - /** * Get the botId property: The bot id. * @@ -182,17 +127,6 @@ public String botId() { return this.botId; } - /** - * Set the botId property: The bot id. - * - * @param botId the botId value to set. - * @return the ChannelSettings object itself. - */ - public ChannelSettings withBotId(String botId) { - this.botId = botId; - return this; - } - /** * Get the botIconUrl property: The bot icon url. * @@ -202,17 +136,6 @@ public String botIconUrl() { return this.botIconUrl; } - /** - * Set the botIconUrl property: The bot icon url. - * - * @param botIconUrl the botIconUrl value to set. - * @return the ChannelSettings object itself. - */ - public ChannelSettings withBotIconUrl(String botIconUrl) { - this.botIconUrl = botIconUrl; - return this; - } - /** * Get the isEnabled property: Whether this channel is enabled for the bot. * @@ -222,17 +145,6 @@ public Boolean isEnabled() { return this.isEnabled; } - /** - * Set the isEnabled property: Whether this channel is enabled for the bot. - * - * @param isEnabled the isEnabled value to set. - * @return the ChannelSettings object itself. - */ - public ChannelSettings withIsEnabled(Boolean isEnabled) { - this.isEnabled = isEnabled; - return this; - } - /** * Get the disableLocalAuth property: Opt-out of local authentication and ensure only MSI and AAD can be used * exclusively for authentication. @@ -243,18 +155,6 @@ public Boolean disableLocalAuth() { return this.disableLocalAuth; } - /** - * Set the disableLocalAuth property: Opt-out of local authentication and ensure only MSI and AAD can be used - * exclusively for authentication. - * - * @param disableLocalAuth the disableLocalAuth value to set. - * @return the ChannelSettings object itself. - */ - public ChannelSettings withDisableLocalAuth(Boolean disableLocalAuth) { - this.disableLocalAuth = disableLocalAuth; - return this; - } - /** * Get the requireTermsAgreement property: Whether customer needs to agree to new terms. * @@ -264,28 +164,6 @@ public Boolean requireTermsAgreement() { return this.requireTermsAgreement; } - /** - * Set the requireTermsAgreement property: Whether customer needs to agree to new terms. - * - * @param requireTermsAgreement the requireTermsAgreement value to set. - * @return the ChannelSettings object itself. - */ - public ChannelSettings withRequireTermsAgreement(Boolean requireTermsAgreement) { - this.requireTermsAgreement = requireTermsAgreement; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sites() != null) { - sites().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Channels.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Channels.java index 060d88ed0d7c..e3cff9ea0e6e 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Channels.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Channels.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -13,13 +13,41 @@ * Resource collection API of Channels. */ public interface Channels { + /** + * Returns a BotService Channel registration specified by the parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param channelName The name of the Bot resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bot channel resource definition along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String resourceName, String channelName, + Context context); + + /** + * Returns a BotService Channel registration specified by the parameters. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param channelName The name of the Bot resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return bot channel resource definition. + */ + BotChannel get(String resourceGroupName, String resourceName, String channelName); + /** * Creates a Channel registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Channel resource. - * @param parameters The parameters to provide for the created bot. + * @param parameters Resource create parameters. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -32,10 +60,10 @@ Response createWithResponse(String resourceGroupName, String resourc /** * Creates a Channel registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Channel resource. - * @param parameters The parameters to provide for the created bot. + * @param parameters Resource create parameters. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -47,7 +75,7 @@ BotChannel create(String resourceGroupName, String resourceName, ChannelName cha /** * Updates a Channel registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Channel resource. * @param parameters The parameters to provide for the created bot. @@ -63,7 +91,7 @@ Response updateWithResponse(String resourceGroupName, String resourc /** * Updates a Channel registration for a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Channel resource. * @param parameters The parameters to provide for the created bot. @@ -78,7 +106,7 @@ BotChannel update(String resourceGroupName, String resourceName, ChannelName cha /** * Deletes a Channel registration from a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Bot resource. * @param context The context to associate with this operation. @@ -93,7 +121,7 @@ Response deleteWithResponse(String resourceGroupName, String resourceName, /** * Deletes a Channel registration from a Bot Service. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Bot resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -103,37 +131,34 @@ Response deleteWithResponse(String resourceGroupName, String resourceName, void delete(String resourceGroupName, String resourceName, String channelName); /** - * Returns a BotService Channel registration specified by the parameters. + * Returns all the Channel registrations of a particular BotService resource. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. - * @param channelName The name of the Bot resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bot channel resource definition along with {@link Response}. + * @return the list of bot service channel operation response as paginated response with {@link PagedIterable}. */ - Response getWithResponse(String resourceGroupName, String resourceName, String channelName, - Context context); + PagedIterable listByResourceGroup(String resourceGroupName, String resourceName); /** - * Returns a BotService Channel registration specified by the parameters. + * Returns all the Channel registrations of a particular BotService resource. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. - * @param channelName The name of the Bot resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return bot channel resource definition. + * @return the list of bot service channel operation response as paginated response with {@link PagedIterable}. */ - BotChannel get(String resourceGroupName, String resourceName, String channelName); + PagedIterable listByResourceGroup(String resourceGroupName, String resourceName, Context context); /** * Lists a Channel registration for a Bot Service including secrets. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Channel resource. * @param context The context to associate with this operation. @@ -148,7 +173,7 @@ Response listWithKeysWithResponse(String resourceGr /** * Lists a Channel registration for a Bot Service including secrets. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Channel resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -157,29 +182,4 @@ Response listWithKeysWithResponse(String resourceGr * @return the ARM channel of list channel with keys operation response. */ ListChannelWithKeysResponse listWithKeys(String resourceGroupName, String resourceName, ChannelName channelName); - - /** - * Returns all the Channel registrations of a particular BotService resource. - * - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service channel operation response as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, String resourceName); - - /** - * Returns all the Channel registrations of a particular BotService resource. - * - * @param resourceGroupName The name of the Bot resource group in the user subscription. - * @param resourceName The name of the Bot resource. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of bot service channel operation response as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, String resourceName, Context context); } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/CheckNameAvailabilityRequestBody.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/CheckNameAvailabilityRequestBody.java index 0316093ed4c1..c33b315f9538 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/CheckNameAvailabilityRequestBody.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/CheckNameAvailabilityRequestBody.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -72,14 +72,6 @@ public CheckNameAvailabilityRequestBody withType(String type) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/CheckNameAvailabilityResponseBody.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/CheckNameAvailabilityResponseBody.java index 615e0d7b0e85..d1cb586b796a 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/CheckNameAvailabilityResponseBody.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/CheckNameAvailabilityResponseBody.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ConnectionSetting.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ConnectionSetting.java index 9a2febca8e10..50a7bf5220a0 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ConnectionSetting.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ConnectionSetting.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; import com.azure.core.http.rest.Response; import com.azure.core.management.Region; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.botservice.fluent.models.ConnectionSettingInner; import java.util.List; @@ -37,25 +38,25 @@ public interface ConnectionSetting { String type(); /** - * Gets the location property: The geo-location where the resource lives. + * Gets the properties property: The set of properties specific to bot channel resource. * - * @return the location value. + * @return the properties value. */ - String location(); + ConnectionSettingProperties properties(); /** - * Gets the tags property: Resource tags. + * Gets the location property: Specifies the location of the resource. * - * @return the tags value. + * @return the location value. */ - Map tags(); + String location(); /** - * Gets the properties property: The set of properties specific to bot channel resource. + * Gets the tags property: Contains resource tags defined as key/value pairs. * - * @return the properties value. + * @return the tags value. */ - ConnectionSettingProperties properties(); + Map tags(); /** * Gets the sku property: Gets or sets the SKU of the resource. @@ -85,6 +86,13 @@ public interface ConnectionSetting { */ List zones(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the region of the resource. * @@ -116,8 +124,8 @@ public interface ConnectionSetting { /** * The entirety of the ConnectionSetting definition. */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } /** @@ -127,28 +135,7 @@ interface DefinitionStages { /** * The first stage of the ConnectionSetting definition. */ - interface Blank extends WithLocation { - } - - /** - * The stage of the ConnectionSetting definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(String location); + interface Blank extends WithParentResource { } /** @@ -158,7 +145,7 @@ interface WithParentResource { /** * Specifies resourceGroupName, resourceName. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @return the next definition stage. */ @@ -169,7 +156,8 @@ interface WithParentResource { * The stage of the ConnectionSetting definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProperties, + interface WithCreate + extends DefinitionStages.WithLocation, DefinitionStages.WithTags, DefinitionStages.WithProperties, DefinitionStages.WithSku, DefinitionStages.WithKind, DefinitionStages.WithEtag { /** * Executes the create request. @@ -187,14 +175,35 @@ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithPro ConnectionSetting create(Context context); } + /** + * The stage of the ConnectionSetting definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location Specifies the location of the resource. + * @return the next definition stage. + */ + WithCreate withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location Specifies the location of the resource. + * @return the next definition stage. + */ + WithCreate withRegion(String location); + } + /** * The stage of the ConnectionSetting definition allowing to specify tags. */ interface WithTags { /** - * Specifies the tags property: Resource tags.. + * Specifies the tags property: Contains resource tags defined as key/value pairs.. * - * @param tags Resource tags. + * @param tags Contains resource tags defined as key/value pairs. * @return the next definition stage. */ WithCreate withTags(Map tags); @@ -244,7 +253,7 @@ interface WithKind { */ interface WithEtag { /** - * Specifies the etag property: Entity Tag. + * Specifies the etag property: Entity Tag.. * * @param etag Entity Tag. * @return the next definition stage. @@ -290,9 +299,9 @@ interface UpdateStages { */ interface WithTags { /** - * Specifies the tags property: Resource tags.. + * Specifies the tags property: Contains resource tags defined as key/value pairs.. * - * @param tags Resource tags. + * @param tags Contains resource tags defined as key/value pairs. * @return the next definition stage. */ Update withTags(Map tags); @@ -342,7 +351,7 @@ interface WithKind { */ interface WithEtag { /** - * Specifies the etag property: Entity Tag. + * Specifies the etag property: Entity Tag.. * * @param etag Entity Tag. * @return the next definition stage. diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ConnectionSettingParameter.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ConnectionSettingParameter.java index 434edfbb09c7..96a866aaba6b 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ConnectionSettingParameter.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ConnectionSettingParameter.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -72,14 +72,6 @@ public ConnectionSettingParameter withValue(String value) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ConnectionSettingProperties.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ConnectionSettingProperties.java index e90f2f9bcec6..4814695b7ea3 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ConnectionSettingProperties.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ConnectionSettingProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -17,6 +17,16 @@ */ @Fluent public final class ConnectionSettingProperties implements JsonSerializable { + /* + * Id of the Connection Setting. + */ + private String id; + + /* + * Name of the Connection Setting. + */ + private String name; + /* * Client Id associated with the Connection Setting. */ @@ -63,6 +73,46 @@ public final class ConnectionSettingProperties implements JsonSerializable e.validate()); - } - } - /** * {@inheritDoc} */ @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + jsonWriter.writeStringField("name", this.name); jsonWriter.writeStringField("clientId", this.clientId); jsonWriter.writeStringField("clientSecret", this.clientSecret); jsonWriter.writeStringField("scopes", this.scopes); @@ -256,7 +297,11 @@ public static ConnectionSettingProperties fromJson(JsonReader jsonReader) throws String fieldName = reader.getFieldName(); reader.nextToken(); - if ("clientId".equals(fieldName)) { + if ("id".equals(fieldName)) { + deserializedConnectionSettingProperties.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedConnectionSettingProperties.name = reader.getString(); + } else if ("clientId".equals(fieldName)) { deserializedConnectionSettingProperties.clientId = reader.getString(); } else if ("settingId".equals(fieldName)) { deserializedConnectionSettingProperties.settingId = reader.getString(); diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/CreateEmailSignInUrlResponse.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/CreateEmailSignInUrlResponse.java new file mode 100644 index 000000000000..e117eae9484a --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/CreateEmailSignInUrlResponse.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.models; + +import com.azure.resourcemanager.botservice.fluent.models.CreateEmailSignInUrlResponseInner; + +/** + * An immutable client-side representation of CreateEmailSignInUrlResponse. + */ +public interface CreateEmailSignInUrlResponse { + /** + * Gets the id property: Specifies the resource ID. + * + * @return the id value. + */ + String id(); + + /** + * Gets the location property: Specifies the location of the resource. + * + * @return the location value. + */ + String location(); + + /** + * Gets the properties property: The set of properties specific to sign in url. + * + * @return the properties value. + */ + CreateEmailSignInUrlResponseProperties properties(); + + /** + * Gets the inner com.azure.resourcemanager.botservice.fluent.models.CreateEmailSignInUrlResponseInner object. + * + * @return the inner object. + */ + CreateEmailSignInUrlResponseInner innerModel(); +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/CreateEmailSignInUrlResponseProperties.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/CreateEmailSignInUrlResponseProperties.java new file mode 100644 index 000000000000..efdcb4dffe4d --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/CreateEmailSignInUrlResponseProperties.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The set of properties specific to sign in url. + */ +@Immutable +public final class CreateEmailSignInUrlResponseProperties + implements JsonSerializable { + /* + * Sign in url. + */ + private String url; + + /** + * Creates an instance of CreateEmailSignInUrlResponseProperties class. + */ + private CreateEmailSignInUrlResponseProperties() { + } + + /** + * Get the url property: Sign in url. + * + * @return the url value. + */ + public String url() { + return this.url; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("url", this.url); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of CreateEmailSignInUrlResponseProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of CreateEmailSignInUrlResponseProperties if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the CreateEmailSignInUrlResponseProperties. + */ + public static CreateEmailSignInUrlResponseProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + CreateEmailSignInUrlResponseProperties deserializedCreateEmailSignInUrlResponseProperties + = new CreateEmailSignInUrlResponseProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("url".equals(fieldName)) { + deserializedCreateEmailSignInUrlResponseProperties.url = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedCreateEmailSignInUrlResponseProperties; + }); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/DirectLineChannel.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/DirectLineChannel.java index 28406a2cd82a..a6613f510064 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/DirectLineChannel.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/DirectLineChannel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -79,18 +79,6 @@ public DirectLineChannel withLocation(String location) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/DirectLineChannelProperties.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/DirectLineChannelProperties.java index 2cb09d6f79d0..53d1220c6702 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/DirectLineChannelProperties.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/DirectLineChannelProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -123,17 +123,6 @@ public DirectLineChannelProperties withDirectLineEmbedCode(String directLineEmbe return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sites() != null) { - sites().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/DirectLineSite.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/DirectLineSite.java index 9ffdb0cca083..7d9e320fe850 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/DirectLineSite.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/DirectLineSite.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -152,8 +151,8 @@ public DirectLineSite withIsNoStorageEnabled(Boolean isNoStorageEnabled) { * {@inheritDoc} */ @Override - public DirectLineSite withEtag(String etag) { - super.withEtag(etag); + public DirectLineSite withETag(String eTag) { + super.withETag(eTag); return this; } @@ -220,21 +219,6 @@ public DirectLineSite withIsWebchatPreviewEnabled(Boolean isWebchatPreviewEnable return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (siteName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property siteName in model DirectLineSite")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DirectLineSite.class); - /** * {@inheritDoc} */ @@ -248,7 +232,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeBooleanField("isDetailedLoggingEnabled", isDetailedLoggingEnabled()); jsonWriter.writeBooleanField("isBlockUserUploadEnabled", isBlockUserUploadEnabled()); jsonWriter.writeBooleanField("isNoStorageEnabled", isNoStorageEnabled()); - jsonWriter.writeStringField("eTag", etag()); + jsonWriter.writeStringField("eTag", eTag()); jsonWriter.writeStringField("appId", appId()); jsonWriter.writeBooleanField("isV1Enabled", isV1Enabled()); jsonWriter.writeBooleanField("isV3Enabled", isV3Enabled()); @@ -300,7 +284,7 @@ public static DirectLineSite fromJson(JsonReader jsonReader) throws IOException } else if ("isNoStorageEnabled".equals(fieldName)) { deserializedDirectLineSite.withIsNoStorageEnabled(reader.getNullable(JsonReader::getBoolean)); } else if ("eTag".equals(fieldName)) { - deserializedDirectLineSite.withEtag(reader.getString()); + deserializedDirectLineSite.withETag(reader.getString()); } else if ("appId".equals(fieldName)) { deserializedDirectLineSite.withAppId(reader.getString()); } else if ("isV1Enabled".equals(fieldName)) { diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/DirectLineSpeechChannel.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/DirectLineSpeechChannel.java index 45c8922ffa25..e5044eb3aa1d 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/DirectLineSpeechChannel.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/DirectLineSpeechChannel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -79,18 +79,6 @@ public DirectLineSpeechChannel withLocation(String location) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/DirectLineSpeechChannelProperties.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/DirectLineSpeechChannelProperties.java index 30da677a5cef..232768897a77 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/DirectLineSpeechChannelProperties.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/DirectLineSpeechChannelProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -200,14 +200,6 @@ public DirectLineSpeechChannelProperties withIsDefaultBotForCogSvcAccount(Boolea return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/DirectLines.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/DirectLines.java index 3bb4340a5ace..74bbaad96d02 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/DirectLines.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/DirectLines.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -14,7 +14,7 @@ public interface DirectLines { /** * Regenerates secret keys and returns them for the DirectLine Channel of a particular BotService resource. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Channel resource for which keys are to be regenerated. * @param parameters The parameters to provide for the created bot. @@ -30,7 +30,7 @@ Response regenerateKeysWithResponse(String resourceGroupName, String /** * Regenerates secret keys and returns them for the DirectLine Channel of a particular BotService resource. * - * @param resourceGroupName The name of the Bot resource group in the user subscription. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param resourceName The name of the Bot resource. * @param channelName The name of the Channel resource for which keys are to be regenerated. * @param parameters The parameters to provide for the created bot. diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/EmailChannel.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/EmailChannel.java index 6d83c0b1e0d3..0efa5481491b 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/EmailChannel.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/EmailChannel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -79,18 +79,6 @@ public EmailChannel withLocation(String location) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/EmailChannelAuthMethod.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/EmailChannelAuthMethod.java index a23c36c0fa48..826b2e3b8113 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/EmailChannelAuthMethod.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/EmailChannelAuthMethod.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -9,21 +9,21 @@ */ public enum EmailChannelAuthMethod { /** - * Enum value 0. + * Basic authentication. */ - ZERO(0f), + PASSWORD(0), /** - * Enum value 1. + * Modern authentication. */ - ONE(1f); + GRAPH(1); /** * The actual serialized value for a EmailChannelAuthMethod instance. */ - private final float value; + private final int value; - EmailChannelAuthMethod(float value) { + EmailChannelAuthMethod(int value) { this.value = value; } @@ -33,10 +33,10 @@ public enum EmailChannelAuthMethod { * @param value the serialized value to parse. * @return the parsed EmailChannelAuthMethod object, or null if unable to parse. */ - public static EmailChannelAuthMethod fromFloat(float value) { + public static EmailChannelAuthMethod fromInt(int value) { EmailChannelAuthMethod[] items = EmailChannelAuthMethod.values(); for (EmailChannelAuthMethod item : items) { - if (Float.floatToIntBits(item.toFloat()) == Float.floatToIntBits(value)) { + if (item.toInt() == value) { return item; } } @@ -44,11 +44,11 @@ public static EmailChannelAuthMethod fromFloat(float value) { } /** - * De-serializes the instance to float value. + * De-serializes the instance to int value. * - * @return the float value. + * @return the int value. */ - public float toFloat() { + public int toInt() { return this.value; } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/EmailChannelProperties.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/EmailChannelProperties.java index 744ec64dc584..da175e1ad202 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/EmailChannelProperties.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/EmailChannelProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -151,21 +150,6 @@ public EmailChannelProperties withIsEnabled(boolean isEnabled) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (emailAddress() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property emailAddress in model EmailChannelProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EmailChannelProperties.class); - /** * {@inheritDoc} */ @@ -174,7 +158,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("emailAddress", this.emailAddress); jsonWriter.writeBooleanField("isEnabled", this.isEnabled); - jsonWriter.writeNumberField("authMethod", this.authMethod == null ? null : this.authMethod.toFloat()); + jsonWriter.writeNumberField("authMethod", this.authMethod == null ? null : this.authMethod.toInt()); jsonWriter.writeStringField("password", this.password); jsonWriter.writeStringField("magicCode", this.magicCode); return jsonWriter.writeEndObject(); @@ -201,7 +185,7 @@ public static EmailChannelProperties fromJson(JsonReader jsonReader) throws IOEx } else if ("isEnabled".equals(fieldName)) { deserializedEmailChannelProperties.isEnabled = reader.getBoolean(); } else if ("authMethod".equals(fieldName)) { - deserializedEmailChannelProperties.authMethod = EmailChannelAuthMethod.fromFloat(reader.getFloat()); + deserializedEmailChannelProperties.authMethod = EmailChannelAuthMethod.fromInt(reader.getInt()); } else if ("password".equals(fieldName)) { deserializedEmailChannelProperties.password = reader.getString(); } else if ("magicCode".equals(fieldName)) { diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Emails.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Emails.java new file mode 100644 index 000000000000..e511cfffaf25 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Emails.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of Emails. + */ +public interface Emails { + /** + * Creates an email channel sign in url for a Bot Service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the ARM create email sign in url operation response along with {@link Response}. + */ + Response createSignInUrlWithResponse(String resourceGroupName, String resourceName, + Context context); + + /** + * Creates an email channel sign in url for a Bot Service. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the ARM create email sign in url operation response. + */ + CreateEmailSignInUrlResponse createSignInUrl(String resourceGroupName, String resourceName); +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/FacebookChannel.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/FacebookChannel.java index 8c3b0ac16c86..fb86737ab3b3 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/FacebookChannel.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/FacebookChannel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -79,18 +79,6 @@ public FacebookChannel withLocation(String location) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/FacebookChannelProperties.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/FacebookChannelProperties.java index e0ebd263ac97..353204cdad62 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/FacebookChannelProperties.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/FacebookChannelProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -155,24 +154,6 @@ public FacebookChannelProperties withIsEnabled(boolean isEnabled) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (pages() != null) { - pages().forEach(e -> e.validate()); - } - if (appId() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property appId in model FacebookChannelProperties")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FacebookChannelProperties.class); - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/FacebookPage.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/FacebookPage.java index 6d406b64c1e0..ffa7ac0ef6f0 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/FacebookPage.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/FacebookPage.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -76,20 +75,6 @@ public FacebookPage withAccessToken(String accessToken) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (id() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property id in model FacebookPage")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(FacebookPage.class); - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/HostSettings.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/HostSettings.java index cb2eef540ecc..f76b38ed25a9 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/HostSettings.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/HostSettings.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/HostSettingsResponse.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/HostSettingsResponse.java index d7cd297bc60c..2886446e7016 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/HostSettingsResponse.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/HostSettingsResponse.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -60,7 +60,7 @@ public interface HostSettingsResponse { Boolean validateAuthority(); /** - * Gets the botOpenIdMetadata property: Same as ToBotFromChannelOpenIdMetadataUrl, used by SDK < v4.12. + * Gets the botOpenIdMetadata property: Same as toBotFromChannelOpenIdMetadataUrl, used by SDK < v4.12. * * @return the botOpenIdMetadata value. */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Key.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Key.java index ca58bdb1aef8..0e43e069baf7 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Key.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Key.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/KikChannel.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/KikChannel.java index 73f96ed26bce..c20abafe87f5 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/KikChannel.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/KikChannel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -79,18 +79,6 @@ public KikChannel withLocation(String location) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/KikChannelProperties.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/KikChannelProperties.java index a7c9d8ec6895..e5d459cc5ab9 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/KikChannelProperties.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/KikChannelProperties.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -20,7 +19,7 @@ public final class KikChannelProperties implements JsonSerializable e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(LineChannelProperties.class); - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/LineRegistration.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/LineRegistration.java index 7f5b83939b76..be48ec149dd9 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/LineRegistration.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/LineRegistration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -86,14 +86,6 @@ public LineRegistration withChannelAccessToken(String channelAccessToken) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ListChannelWithKeysResponse.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ListChannelWithKeysResponse.java index 76cebcf1c2b0..90442caf0f25 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ListChannelWithKeysResponse.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ListChannelWithKeysResponse.java @@ -1,9 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.botservice.fluent.models.ListChannelWithKeysResponseInner; import java.util.List; import java.util.Map; @@ -34,25 +35,25 @@ public interface ListChannelWithKeysResponse { String type(); /** - * Gets the location property: The geo-location where the resource lives. + * Gets the properties property: The set of properties specific to bot channel resource. * - * @return the location value. + * @return the properties value. */ - String location(); + Channel properties(); /** - * Gets the tags property: Resource tags. + * Gets the location property: Specifies the location of the resource. * - * @return the tags value. + * @return the location value. */ - Map tags(); + String location(); /** - * Gets the properties property: The set of properties specific to bot channel resource. + * Gets the tags property: Contains resource tags defined as key/value pairs. * - * @return the properties value. + * @return the tags value. */ - Channel properties(); + Map tags(); /** * Gets the sku property: Gets or sets the SKU of the resource. @@ -82,6 +83,13 @@ public interface ListChannelWithKeysResponse { */ List zones(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the resource property: The set of properties specific to bot channel resource. * diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/M365Extensions.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/M365Extensions.java index 5c01ebc04656..5b00ae157703 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/M365Extensions.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/M365Extensions.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -54,15 +54,6 @@ public M365Extensions withLocation(String location) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/MsTeamsChannel.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/MsTeamsChannel.java index a5109d09873b..4a0bd08e57fc 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/MsTeamsChannel.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/MsTeamsChannel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -79,18 +79,6 @@ public MsTeamsChannel withLocation(String location) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/MsTeamsChannelProperties.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/MsTeamsChannelProperties.java index 2d0526599de9..b02f5ba3f083 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/MsTeamsChannelProperties.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/MsTeamsChannelProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -172,14 +172,6 @@ public MsTeamsChannelProperties withAcceptedTerms(Boolean acceptedTerms) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/MsaAppType.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/MsaAppType.java index 4522ad5b6319..574bf5e79e4a 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/MsaAppType.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/MsaAppType.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/NetworkSecurityPerimeter.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/NetworkSecurityPerimeter.java new file mode 100644 index 000000000000..cf8d3d7eed46 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/NetworkSecurityPerimeter.java @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Information about Network Security Perimeter. + */ +@Immutable +public final class NetworkSecurityPerimeter implements JsonSerializable { + /* + * Fully qualified resource ID for the resource. E.g. + * "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + */ + private String id; + + /* + * Guid of the Network Security Perimeter + */ + private String perimeterGuid; + + /* + * Location of the Network Security Perimeter + */ + private String location; + + /** + * Creates an instance of NetworkSecurityPerimeter class. + */ + private NetworkSecurityPerimeter() { + } + + /** + * Get the id property: Fully qualified resource ID for the resource. E.g. + * "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the perimeterGuid property: Guid of the Network Security Perimeter. + * + * @return the perimeterGuid value. + */ + public String perimeterGuid() { + return this.perimeterGuid; + } + + /** + * Get the location property: Location of the Network Security Perimeter. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("perimeterGuid", this.perimeterGuid); + jsonWriter.writeStringField("location", this.location); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkSecurityPerimeter from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkSecurityPerimeter if the JsonReader was pointing to an instance of it, or null if + * it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkSecurityPerimeter. + */ + public static NetworkSecurityPerimeter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkSecurityPerimeter deserializedNetworkSecurityPerimeter = new NetworkSecurityPerimeter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedNetworkSecurityPerimeter.id = reader.getString(); + } else if ("perimeterGuid".equals(fieldName)) { + deserializedNetworkSecurityPerimeter.perimeterGuid = reader.getString(); + } else if ("location".equals(fieldName)) { + deserializedNetworkSecurityPerimeter.location = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkSecurityPerimeter; + }); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/NetworkSecurityPerimeterConfiguration.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/NetworkSecurityPerimeterConfiguration.java new file mode 100644 index 000000000000..5233b17b473a --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/NetworkSecurityPerimeterConfiguration.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.botservice.fluent.models.NetworkSecurityPerimeterConfigurationInner; + +/** + * An immutable client-side representation of NetworkSecurityPerimeterConfiguration. + */ +public interface NetworkSecurityPerimeterConfiguration { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: Properties of the Network Security Perimeter configuration. + * + * @return the properties value. + */ + NetworkSecurityPerimeterConfigurationProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.botservice.fluent.models.NetworkSecurityPerimeterConfigurationInner + * object. + * + * @return the inner object. + */ + NetworkSecurityPerimeterConfigurationInner innerModel(); +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/NetworkSecurityPerimeterConfigurationProperties.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/NetworkSecurityPerimeterConfigurationProperties.java new file mode 100644 index 000000000000..a9920e44bf34 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/NetworkSecurityPerimeterConfigurationProperties.java @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Properties of Network Security Perimeter configuration. + */ +@Immutable +public final class NetworkSecurityPerimeterConfigurationProperties + implements JsonSerializable { + /* + * The provisioningState property. + */ + private ProvisioningState provisioningState; + + /* + * List of Provisioning Issues if any + */ + private List provisioningIssues; + + /* + * Information about Network Security Perimeter + */ + private NetworkSecurityPerimeter networkSecurityPerimeter; + + /* + * Information about resource association + */ + private ResourceAssociation resourceAssociation; + + /* + * Information about profile + */ + private Profile profile; + + /** + * Creates an instance of NetworkSecurityPerimeterConfigurationProperties class. + */ + private NetworkSecurityPerimeterConfigurationProperties() { + } + + /** + * Get the provisioningState property: The provisioningState property. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the provisioningIssues property: List of Provisioning Issues if any. + * + * @return the provisioningIssues value. + */ + public List provisioningIssues() { + return this.provisioningIssues; + } + + /** + * Get the networkSecurityPerimeter property: Information about Network Security Perimeter. + * + * @return the networkSecurityPerimeter value. + */ + public NetworkSecurityPerimeter networkSecurityPerimeter() { + return this.networkSecurityPerimeter; + } + + /** + * Get the resourceAssociation property: Information about resource association. + * + * @return the resourceAssociation value. + */ + public ResourceAssociation resourceAssociation() { + return this.resourceAssociation; + } + + /** + * Get the profile property: Information about profile. + * + * @return the profile value. + */ + public Profile profile() { + return this.profile; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("provisioningState", + this.provisioningState == null ? null : this.provisioningState.toString()); + jsonWriter.writeArrayField("provisioningIssues", this.provisioningIssues, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NetworkSecurityPerimeterConfigurationProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NetworkSecurityPerimeterConfigurationProperties if the JsonReader was pointing to an + * instance of it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NetworkSecurityPerimeterConfigurationProperties. + */ + public static NetworkSecurityPerimeterConfigurationProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NetworkSecurityPerimeterConfigurationProperties deserializedNetworkSecurityPerimeterConfigurationProperties + = new NetworkSecurityPerimeterConfigurationProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("provisioningState".equals(fieldName)) { + deserializedNetworkSecurityPerimeterConfigurationProperties.provisioningState + = ProvisioningState.fromString(reader.getString()); + } else if ("provisioningIssues".equals(fieldName)) { + List provisioningIssues + = reader.readArray(reader1 -> ProvisioningIssue.fromJson(reader1)); + deserializedNetworkSecurityPerimeterConfigurationProperties.provisioningIssues = provisioningIssues; + } else if ("networkSecurityPerimeter".equals(fieldName)) { + deserializedNetworkSecurityPerimeterConfigurationProperties.networkSecurityPerimeter + = NetworkSecurityPerimeter.fromJson(reader); + } else if ("resourceAssociation".equals(fieldName)) { + deserializedNetworkSecurityPerimeterConfigurationProperties.resourceAssociation + = ResourceAssociation.fromJson(reader); + } else if ("profile".equals(fieldName)) { + deserializedNetworkSecurityPerimeterConfigurationProperties.profile = Profile.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNetworkSecurityPerimeterConfigurationProperties; + }); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/NetworkSecurityPerimeterConfigurations.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/NetworkSecurityPerimeterConfigurations.java new file mode 100644 index 000000000000..37b672e59cd9 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/NetworkSecurityPerimeterConfigurations.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of NetworkSecurityPerimeterConfigurations. + */ +public interface NetworkSecurityPerimeterConfigurations { + /** + * Gets the specified Network Security Perimeter configuration associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param networkSecurityPerimeterConfigurationName The resource association Name. Composed of parameter guid and + * association name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Network Security Perimeter configuration associated with the Bot along with + * {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String resourceName, + String networkSecurityPerimeterConfigurationName, Context context); + + /** + * Gets the specified Network Security Perimeter configuration associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param networkSecurityPerimeterConfigurationName The resource association Name. Composed of parameter guid and + * association name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Network Security Perimeter configuration associated with the Bot. + */ + NetworkSecurityPerimeterConfiguration get(String resourceGroupName, String resourceName, + String networkSecurityPerimeterConfigurationName); + + /** + * List Network Security Perimeter configurations associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the List NetworkSecurityPerimeterConfiguration operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String resourceName); + + /** + * List Network Security Perimeter configurations associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the List NetworkSecurityPerimeterConfiguration operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String resourceName, + Context context); + + /** + * Reconcile the specified Network Security Perimeter configuration associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param networkSecurityPerimeterConfigurationName The resource association Name. Composed of parameter guid and + * association name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkSecurityPerimeterConfiguration reconcile(String resourceGroupName, String resourceName, + String networkSecurityPerimeterConfigurationName); + + /** + * Reconcile the specified Network Security Perimeter configuration associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param networkSecurityPerimeterConfigurationName The resource association Name. Composed of parameter guid and + * association name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + NetworkSecurityPerimeterConfiguration reconcile(String resourceGroupName, String resourceName, + String networkSecurityPerimeterConfigurationName, Context context); +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/NspAccessRule.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/NspAccessRule.java new file mode 100644 index 000000000000..3f5265bcec97 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/NspAccessRule.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Information of Access Rule in a profile. + */ +@Immutable +public final class NspAccessRule implements JsonSerializable { + /* + * Name of the access rule + */ + private String name; + + /* + * Properties of Access Rule + */ + private NspAccessRuleProperties properties; + + /** + * Creates an instance of NspAccessRule class. + */ + private NspAccessRule() { + } + + /** + * Get the name property: Name of the access rule. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the properties property: Properties of Access Rule. + * + * @return the properties value. + */ + public NspAccessRuleProperties properties() { + return this.properties; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NspAccessRule from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NspAccessRule if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the NspAccessRule. + */ + public static NspAccessRule fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NspAccessRule deserializedNspAccessRule = new NspAccessRule(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedNspAccessRule.name = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedNspAccessRule.properties = NspAccessRuleProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedNspAccessRule; + }); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/NspAccessRuleDirection.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/NspAccessRuleDirection.java new file mode 100644 index 000000000000..fb223e6768e3 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/NspAccessRuleDirection.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Direction of Access Rule. + */ +public final class NspAccessRuleDirection extends ExpandableStringEnum { + /** + * Static value Inbound for NspAccessRuleDirection. + */ + public static final NspAccessRuleDirection INBOUND = fromString("Inbound"); + + /** + * Static value Outbound for NspAccessRuleDirection. + */ + public static final NspAccessRuleDirection OUTBOUND = fromString("Outbound"); + + /** + * Creates a new instance of NspAccessRuleDirection value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NspAccessRuleDirection() { + } + + /** + * Creates or finds a NspAccessRuleDirection from its string representation. + * + * @param name a name to look for. + * @return the corresponding NspAccessRuleDirection. + */ + public static NspAccessRuleDirection fromString(String name) { + return fromString(name, NspAccessRuleDirection.class); + } + + /** + * Gets known NspAccessRuleDirection values. + * + * @return known NspAccessRuleDirection values. + */ + public static Collection values() { + return values(NspAccessRuleDirection.class); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/NspAccessRuleProperties.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/NspAccessRuleProperties.java new file mode 100644 index 000000000000..c09b8eca9295 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/NspAccessRuleProperties.java @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Properties of Access Rule. + */ +@Immutable +public final class NspAccessRuleProperties implements JsonSerializable { + /* + * Direction of Access Rule + */ + private NspAccessRuleDirection direction; + + /* + * Address prefixes in the CIDR format for inbound rules + */ + private List addressPrefixes; + + /* + * Subscriptions for inbound rules + */ + private List subscriptions; + + /* + * NetworkSecurityPerimeters for inbound rules + */ + private List networkSecurityPerimeters; + + /* + * FQDN for outbound rules + */ + private List fullyQualifiedDomainNames; + + /* + * Email addresses for outbound rules + */ + private List emailAddresses; + + /* + * Phone numbers for outbound rules + */ + private List phoneNumbers; + + /** + * Creates an instance of NspAccessRuleProperties class. + */ + private NspAccessRuleProperties() { + } + + /** + * Get the direction property: Direction of Access Rule. + * + * @return the direction value. + */ + public NspAccessRuleDirection direction() { + return this.direction; + } + + /** + * Get the addressPrefixes property: Address prefixes in the CIDR format for inbound rules. + * + * @return the addressPrefixes value. + */ + public List addressPrefixes() { + return this.addressPrefixes; + } + + /** + * Get the subscriptions property: Subscriptions for inbound rules. + * + * @return the subscriptions value. + */ + public List subscriptions() { + return this.subscriptions; + } + + /** + * Get the networkSecurityPerimeters property: NetworkSecurityPerimeters for inbound rules. + * + * @return the networkSecurityPerimeters value. + */ + public List networkSecurityPerimeters() { + return this.networkSecurityPerimeters; + } + + /** + * Get the fullyQualifiedDomainNames property: FQDN for outbound rules. + * + * @return the fullyQualifiedDomainNames value. + */ + public List fullyQualifiedDomainNames() { + return this.fullyQualifiedDomainNames; + } + + /** + * Get the emailAddresses property: Email addresses for outbound rules. + * + * @return the emailAddresses value. + */ + public List emailAddresses() { + return this.emailAddresses; + } + + /** + * Get the phoneNumbers property: Phone numbers for outbound rules. + * + * @return the phoneNumbers value. + */ + public List phoneNumbers() { + return this.phoneNumbers; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("direction", this.direction == null ? null : this.direction.toString()); + jsonWriter.writeArrayField("addressPrefixes", this.addressPrefixes, + (writer, element) -> writer.writeString(element)); + jsonWriter.writeArrayField("subscriptions", this.subscriptions, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NspAccessRuleProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NspAccessRuleProperties if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the NspAccessRuleProperties. + */ + public static NspAccessRuleProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NspAccessRuleProperties deserializedNspAccessRuleProperties = new NspAccessRuleProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("direction".equals(fieldName)) { + deserializedNspAccessRuleProperties.direction + = NspAccessRuleDirection.fromString(reader.getString()); + } else if ("addressPrefixes".equals(fieldName)) { + List addressPrefixes = reader.readArray(reader1 -> reader1.getString()); + deserializedNspAccessRuleProperties.addressPrefixes = addressPrefixes; + } else if ("subscriptions".equals(fieldName)) { + List subscriptions + = reader.readArray(reader1 -> NspAccessRulePropertiesSubscriptionsItem.fromJson(reader1)); + deserializedNspAccessRuleProperties.subscriptions = subscriptions; + } else if ("networkSecurityPerimeters".equals(fieldName)) { + List networkSecurityPerimeters + = reader.readArray(reader1 -> NetworkSecurityPerimeter.fromJson(reader1)); + deserializedNspAccessRuleProperties.networkSecurityPerimeters = networkSecurityPerimeters; + } else if ("fullyQualifiedDomainNames".equals(fieldName)) { + List fullyQualifiedDomainNames = reader.readArray(reader1 -> reader1.getString()); + deserializedNspAccessRuleProperties.fullyQualifiedDomainNames = fullyQualifiedDomainNames; + } else if ("emailAddresses".equals(fieldName)) { + List emailAddresses = reader.readArray(reader1 -> reader1.getString()); + deserializedNspAccessRuleProperties.emailAddresses = emailAddresses; + } else if ("phoneNumbers".equals(fieldName)) { + List phoneNumbers = reader.readArray(reader1 -> reader1.getString()); + deserializedNspAccessRuleProperties.phoneNumbers = phoneNumbers; + } else { + reader.skipChildren(); + } + } + + return deserializedNspAccessRuleProperties; + }); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/NspAccessRulePropertiesSubscriptionsItem.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/NspAccessRulePropertiesSubscriptionsItem.java new file mode 100644 index 000000000000..ea29c3e23c80 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/NspAccessRulePropertiesSubscriptionsItem.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Subscription for inbound rule. + */ +@Immutable +public final class NspAccessRulePropertiesSubscriptionsItem + implements JsonSerializable { + /* + * Fully qualified identifier of subscription + */ + private String id; + + /** + * Creates an instance of NspAccessRulePropertiesSubscriptionsItem class. + */ + private NspAccessRulePropertiesSubscriptionsItem() { + } + + /** + * Get the id property: Fully qualified identifier of subscription. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("id", this.id); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of NspAccessRulePropertiesSubscriptionsItem from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of NspAccessRulePropertiesSubscriptionsItem if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the NspAccessRulePropertiesSubscriptionsItem. + */ + public static NspAccessRulePropertiesSubscriptionsItem fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + NspAccessRulePropertiesSubscriptionsItem deserializedNspAccessRulePropertiesSubscriptionsItem + = new NspAccessRulePropertiesSubscriptionsItem(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedNspAccessRulePropertiesSubscriptionsItem.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedNspAccessRulePropertiesSubscriptionsItem; + }); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Omnichannel.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Omnichannel.java index edaff8095710..7b2c3a7d1345 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Omnichannel.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Omnichannel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -54,15 +54,6 @@ public Omnichannel withLocation(String location) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/OperationDisplayInfo.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/OperationDisplayInfo.java index 79794e25805b..2968fbd166ca 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/OperationDisplayInfo.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/OperationDisplayInfo.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * The operation supported by Bot Service Management. */ -@Fluent +@Immutable public final class OperationDisplayInfo implements JsonSerializable { /* * The description of the operation. @@ -39,7 +39,7 @@ public final class OperationDisplayInfo implements JsonSerializable { + /** + * Static value Canceled for OperationResultStatus. + */ + public static final OperationResultStatus CANCELED = fromString("Canceled"); + + /** + * Static value Succeeded for OperationResultStatus. + */ + public static final OperationResultStatus SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for OperationResultStatus. + */ + public static final OperationResultStatus FAILED = fromString("Failed"); + + /** + * Static value Requested for OperationResultStatus. + */ + public static final OperationResultStatus REQUESTED = fromString("Requested"); + + /** + * Static value Running for OperationResultStatus. + */ + public static final OperationResultStatus RUNNING = fromString("Running"); + + /** + * Creates a new instance of OperationResultStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OperationResultStatus() { + } + + /** + * Creates or finds a OperationResultStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding OperationResultStatus. + */ + public static OperationResultStatus fromString(String name) { + return fromString(name, OperationResultStatus.class); + } + + /** + * Gets known OperationResultStatus values. + * + * @return known OperationResultStatus values. + */ + public static Collection values() { + return values(OperationResultStatus.class); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/OperationResults.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/OperationResults.java new file mode 100644 index 000000000000..2fdb653556dc --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/OperationResults.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.models; + +import com.azure.core.util.Context; + +/** + * Resource collection API of OperationResults. + */ +public interface OperationResults { + /** + * Get the operation result for a long running operation. + * + * @param operationResultId The ID of the operation result to get. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation result for a long running operation. + */ + OperationResultsDescription get(String operationResultId); + + /** + * Get the operation result for a long running operation. + * + * @param operationResultId The ID of the operation result to get. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the operation result for a long running operation. + */ + OperationResultsDescription get(String operationResultId, Context context); +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/OperationResultsDescription.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/OperationResultsDescription.java new file mode 100644 index 000000000000..eafd8c2cf73b --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/OperationResultsDescription.java @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.models; + +import com.azure.resourcemanager.botservice.fluent.models.OperationResultsDescriptionInner; +import java.time.OffsetDateTime; + +/** + * An immutable client-side representation of OperationResultsDescription. + */ +public interface OperationResultsDescription { + /** + * Gets the id property: The ID of the operation returned. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the operation result. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: The status of the operation being performed. + * + * @return the status value. + */ + OperationResultStatus status(); + + /** + * Gets the startTime property: The time that the operation was started. + * + * @return the startTime value. + */ + OffsetDateTime startTime(); + + /** + * Gets the inner com.azure.resourcemanager.botservice.fluent.models.OperationResultsDescriptionInner object. + * + * @return the inner object. + */ + OperationResultsDescriptionInner innerModel(); +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Operations.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Operations.java index 83bee530613f..a68145cbea76 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Operations.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Operations.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -12,7 +12,7 @@ */ public interface Operations { /** - * Lists all the available BotService operations. + * List the operations for the provider. * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -21,7 +21,7 @@ public interface Operations { PagedIterable list(); /** - * Lists all the available BotService operations. + * List the operations for the provider. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/OutlookChannel.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/OutlookChannel.java index 0a21ff4c3b5c..1a09f894993d 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/OutlookChannel.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/OutlookChannel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -54,15 +54,6 @@ public OutlookChannel withLocation(String location) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpoint.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpoint.java new file mode 100644 index 000000000000..1dd45fb9a79c --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpoint.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The Private Endpoint resource. + */ +@Immutable +public final class PrivateEndpoint implements JsonSerializable { + /* + * The ARM identifier for Private Endpoint + */ + private String id; + + /** + * Creates an instance of PrivateEndpoint class. + */ + public PrivateEndpoint() { + } + + /** + * Get the id property: The ARM identifier for Private Endpoint. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateEndpoint from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateEndpoint if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the PrivateEndpoint. + */ + public static PrivateEndpoint fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateEndpoint deserializedPrivateEndpoint = new PrivateEndpoint(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPrivateEndpoint.id = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateEndpoint; + }); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointConnection.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointConnection.java new file mode 100644 index 000000000000..bdc0030de3ff --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointConnection.java @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.botservice.fluent.models.PrivateEndpointConnectionInner; +import java.util.List; + +/** + * An immutable client-side representation of PrivateEndpointConnection. + */ +public interface PrivateEndpointConnection { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the privateEndpoint property: The resource of private end point. + * + * @return the privateEndpoint value. + */ + PrivateEndpoint privateEndpoint(); + + /** + * Gets the privateLinkServiceConnectionState property: A collection of information about the state of the + * connection between service consumer and provider. + * + * @return the privateLinkServiceConnectionState value. + */ + PrivateLinkServiceConnectionState privateLinkServiceConnectionState(); + + /** + * Gets the provisioningState property: The provisioning state of the private endpoint connection resource. + * + * @return the provisioningState value. + */ + PrivateEndpointConnectionProvisioningState provisioningState(); + + /** + * Gets the groupIds property: Group ids. + * + * @return the groupIds value. + */ + List groupIds(); + + /** + * Gets the inner com.azure.resourcemanager.botservice.fluent.models.PrivateEndpointConnectionInner object. + * + * @return the inner object. + */ + PrivateEndpointConnectionInner innerModel(); + + /** + * The entirety of the PrivateEndpointConnection definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The PrivateEndpointConnection definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the PrivateEndpointConnection definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the PrivateEndpointConnection definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, resourceName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @return the next definition stage. + */ + WithCreate withExistingBotService(String resourceGroupName, String resourceName); + } + + /** + * The stage of the PrivateEndpointConnection definition which contains all the minimum required properties for + * the resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithPrivateEndpoint, + DefinitionStages.WithPrivateLinkServiceConnectionState, DefinitionStages.WithGroupIds { + /** + * Executes the create request. + * + * @return the created resource. + */ + PrivateEndpointConnection create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + PrivateEndpointConnection create(Context context); + } + + /** + * The stage of the PrivateEndpointConnection definition allowing to specify privateEndpoint. + */ + interface WithPrivateEndpoint { + /** + * Specifies the privateEndpoint property: The resource of private end point.. + * + * @param privateEndpoint The resource of private end point. + * @return the next definition stage. + */ + WithCreate withPrivateEndpoint(PrivateEndpoint privateEndpoint); + } + + /** + * The stage of the PrivateEndpointConnection definition allowing to specify privateLinkServiceConnectionState. + */ + interface WithPrivateLinkServiceConnectionState { + /** + * Specifies the privateLinkServiceConnectionState property: A collection of information about the state of + * the connection between service consumer and provider.. + * + * @param privateLinkServiceConnectionState A collection of information about the state of the connection + * between service consumer and provider. + * @return the next definition stage. + */ + WithCreate withPrivateLinkServiceConnectionState( + PrivateLinkServiceConnectionState privateLinkServiceConnectionState); + } + + /** + * The stage of the PrivateEndpointConnection definition allowing to specify groupIds. + */ + interface WithGroupIds { + /** + * Specifies the groupIds property: Group ids. + * + * @param groupIds Group ids. + * @return the next definition stage. + */ + WithCreate withGroupIds(List groupIds); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + PrivateEndpointConnection refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + PrivateEndpointConnection refresh(Context context); +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointConnectionProvisioningState.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointConnectionProvisioningState.java new file mode 100644 index 000000000000..4c3bd8f3b753 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointConnectionProvisioningState.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The current provisioning state. + */ +public final class PrivateEndpointConnectionProvisioningState + extends ExpandableStringEnum { + /** + * Static value Succeeded for PrivateEndpointConnectionProvisioningState. + */ + public static final PrivateEndpointConnectionProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Creating for PrivateEndpointConnectionProvisioningState. + */ + public static final PrivateEndpointConnectionProvisioningState CREATING = fromString("Creating"); + + /** + * Static value Deleting for PrivateEndpointConnectionProvisioningState. + */ + public static final PrivateEndpointConnectionProvisioningState DELETING = fromString("Deleting"); + + /** + * Static value Failed for PrivateEndpointConnectionProvisioningState. + */ + public static final PrivateEndpointConnectionProvisioningState FAILED = fromString("Failed"); + + /** + * Creates a new instance of PrivateEndpointConnectionProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PrivateEndpointConnectionProvisioningState() { + } + + /** + * Creates or finds a PrivateEndpointConnectionProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding PrivateEndpointConnectionProvisioningState. + */ + public static PrivateEndpointConnectionProvisioningState fromString(String name) { + return fromString(name, PrivateEndpointConnectionProvisioningState.class); + } + + /** + * Gets known PrivateEndpointConnectionProvisioningState values. + * + * @return known PrivateEndpointConnectionProvisioningState values. + */ + public static Collection values() { + return values(PrivateEndpointConnectionProvisioningState.class); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointConnections.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointConnections.java new file mode 100644 index 000000000000..d259d290e524 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointConnections.java @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of PrivateEndpointConnections. + */ +public interface PrivateEndpointConnections { + /** + * Gets the specified private endpoint connection associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified private endpoint connection associated with the Bot along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String resourceName, + String privateEndpointConnectionName, Context context); + + /** + * Gets the specified private endpoint connection associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified private endpoint connection associated with the Bot. + */ + PrivateEndpointConnection get(String resourceGroupName, String resourceName, String privateEndpointConnectionName); + + /** + * Deletes the specified private endpoint connection associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteWithResponse(String resourceGroupName, String resourceName, + String privateEndpointConnectionName, Context context); + + /** + * Deletes the specified private endpoint connection associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String resourceName, String privateEndpointConnectionName); + + /** + * List all the private endpoint connections associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account as paginated response + * with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String resourceName); + + /** + * List all the private endpoint connections associated with the Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified storage account as paginated response + * with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String resourceName, Context context); + + /** + * Gets the specified private endpoint connection associated with the Bot. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified private endpoint connection associated with the Bot along with {@link Response}. + */ + PrivateEndpointConnection getById(String id); + + /** + * Gets the specified private endpoint connection associated with the Bot. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified private endpoint connection associated with the Bot along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Deletes the specified private endpoint connection associated with the Bot. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Deletes the specified private endpoint connection associated with the Bot. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new PrivateEndpointConnection resource. + * + * @param name resource name. + * @return the first stage of the new PrivateEndpointConnection definition. + */ + PrivateEndpointConnection.DefinitionStages.Blank define(String name); +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointServiceConnectionStatus.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointServiceConnectionStatus.java new file mode 100644 index 000000000000..4376648cabee --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointServiceConnectionStatus.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * The private endpoint connection status. + */ +public final class PrivateEndpointServiceConnectionStatus + extends ExpandableStringEnum { + /** + * Static value Pending for PrivateEndpointServiceConnectionStatus. + */ + public static final PrivateEndpointServiceConnectionStatus PENDING = fromString("Pending"); + + /** + * Static value Approved for PrivateEndpointServiceConnectionStatus. + */ + public static final PrivateEndpointServiceConnectionStatus APPROVED = fromString("Approved"); + + /** + * Static value Rejected for PrivateEndpointServiceConnectionStatus. + */ + public static final PrivateEndpointServiceConnectionStatus REJECTED = fromString("Rejected"); + + /** + * Creates a new instance of PrivateEndpointServiceConnectionStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PrivateEndpointServiceConnectionStatus() { + } + + /** + * Creates or finds a PrivateEndpointServiceConnectionStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding PrivateEndpointServiceConnectionStatus. + */ + public static PrivateEndpointServiceConnectionStatus fromString(String name) { + return fromString(name, PrivateEndpointServiceConnectionStatus.class); + } + + /** + * Gets known PrivateEndpointServiceConnectionStatus values. + * + * @return known PrivateEndpointServiceConnectionStatus values. + */ + public static Collection values() { + return values(PrivateEndpointServiceConnectionStatus.class); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkResource.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkResource.java new file mode 100644 index 000000000000..efde72066187 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkResource.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import com.azure.resourcemanager.botservice.fluent.models.PrivateLinkResourceProperties; +import java.io.IOException; +import java.util.List; + +/** + * A private link resource. + */ +@Immutable +public final class PrivateLinkResource extends PrivateLinkResourceBase { + /* + * Resource properties. + */ + private PrivateLinkResourceProperties innerProperties; + + /* + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + */ + private String type; + + /* + * The name of the resource + */ + private String name; + + /* + * Fully qualified resource ID for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{ + * resourceType}/{resourceName} + */ + private String id; + + /** + * Creates an instance of PrivateLinkResource class. + */ + private PrivateLinkResource() { + } + + /** + * Get the innerProperties property: Resource properties. + * + * @return the innerProperties value. + */ + private PrivateLinkResourceProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the type property: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + * "Microsoft.Storage/storageAccounts". + * + * @return the type value. + */ + @Override + public String type() { + return this.type; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + @Override + public String name() { + return this.name; + } + + /** + * Get the id property: Fully qualified resource ID for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + * + * @return the id value. + */ + @Override + public String id() { + return this.id; + } + + /** + * Get the groupId property: The private link resource group id. + * + * @return the groupId value. + */ + public String groupId() { + return this.innerProperties() == null ? null : this.innerProperties().groupId(); + } + + /** + * Get the requiredMembers property: The private link resource required member names. + * + * @return the requiredMembers value. + */ + public List requiredMembers() { + return this.innerProperties() == null ? null : this.innerProperties().requiredMembers(); + } + + /** + * Get the requiredZoneNames property: The private link resource Private link DNS zone name. + * + * @return the requiredZoneNames value. + */ + public List requiredZoneNames() { + return this.innerProperties() == null ? null : this.innerProperties().requiredZoneNames(); + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeJsonField("properties", this.innerProperties); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateLinkResource from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateLinkResource if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the PrivateLinkResource. + */ + public static PrivateLinkResource fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateLinkResource deserializedPrivateLinkResource = new PrivateLinkResource(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPrivateLinkResource.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPrivateLinkResource.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPrivateLinkResource.type = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedPrivateLinkResource.innerProperties = PrivateLinkResourceProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateLinkResource; + }); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkResourceBase.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkResourceBase.java new file mode 100644 index 000000000000..47d71478a0f9 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkResourceBase.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Common fields that are returned in the response for all BotService Private Link Resources. + */ +@Immutable +public class PrivateLinkResourceBase implements JsonSerializable { + /* + * Fully qualified resource ID for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{ + * resourceType}/{resourceName} + */ + private String id; + + /* + * The name of the resource + */ + private String name; + + /* + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + */ + private String type; + + /** + * Creates an instance of PrivateLinkResourceBase class. + */ + protected PrivateLinkResourceBase() { + } + + /** + * Get the id property: Fully qualified resource ID for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Fully qualified resource ID for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + * + * @param id the id value to set. + * @return the PrivateLinkResourceBase object itself. + */ + PrivateLinkResourceBase withId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: The name of the resource. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the resource. + * + * @param name the name value to set. + * @return the PrivateLinkResourceBase object itself. + */ + PrivateLinkResourceBase withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type property: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + * "Microsoft.Storage/storageAccounts". + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Set the type property: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + * "Microsoft.Storage/storageAccounts". + * + * @param type the type value to set. + * @return the PrivateLinkResourceBase object itself. + */ + PrivateLinkResourceBase withType(String type) { + this.type = type; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateLinkResourceBase from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateLinkResourceBase if the JsonReader was pointing to an instance of it, or null if it + * was pointing to JSON null. + * @throws IOException If an error occurs while reading the PrivateLinkResourceBase. + */ + public static PrivateLinkResourceBase fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateLinkResourceBase deserializedPrivateLinkResourceBase = new PrivateLinkResourceBase(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("id".equals(fieldName)) { + deserializedPrivateLinkResourceBase.id = reader.getString(); + } else if ("name".equals(fieldName)) { + deserializedPrivateLinkResourceBase.name = reader.getString(); + } else if ("type".equals(fieldName)) { + deserializedPrivateLinkResourceBase.type = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateLinkResourceBase; + }); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkResourceListResult.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkResourceListResult.java new file mode 100644 index 000000000000..292bd4b3cd8e --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkResourceListResult.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.models; + +import com.azure.resourcemanager.botservice.fluent.models.PrivateLinkResourceListResultInner; +import java.util.List; + +/** + * An immutable client-side representation of PrivateLinkResourceListResult. + */ +public interface PrivateLinkResourceListResult { + /** + * Gets the value property: Array of private link resources. + * + * @return the value value. + */ + List value(); + + /** + * Gets the inner com.azure.resourcemanager.botservice.fluent.models.PrivateLinkResourceListResultInner object. + * + * @return the inner object. + */ + PrivateLinkResourceListResultInner innerModel(); +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkResources.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkResources.java new file mode 100644 index 000000000000..dcdcea1664be --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkResources.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of PrivateLinkResources. + */ +public interface PrivateLinkResources { + /** + * Gets the private link resources that need to be created for a Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private link resources that need to be created for a Bot along with {@link Response}. + */ + Response listByBotResourceWithResponse(String resourceGroupName, String resourceName, + Context context); + + /** + * Gets the private link resources that need to be created for a Bot. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param resourceName The name of the Bot resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the private link resources that need to be created for a Bot. + */ + PrivateLinkResourceListResult listByBotResource(String resourceGroupName, String resourceName); +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkServiceConnectionState.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkServiceConnectionState.java new file mode 100644 index 000000000000..0ffe43efd6aa --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkServiceConnectionState.java @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * A collection of information about the state of the connection between service consumer and provider. + */ +@Fluent +public final class PrivateLinkServiceConnectionState implements JsonSerializable { + /* + * Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + */ + private PrivateEndpointServiceConnectionStatus status; + + /* + * The reason for approval/rejection of the connection. + */ + private String description; + + /* + * A message indicating if changes on the service provider require any updates on the consumer. + */ + private String actionsRequired; + + /** + * Creates an instance of PrivateLinkServiceConnectionState class. + */ + public PrivateLinkServiceConnectionState() { + } + + /** + * Get the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the + * service. + * + * @return the status value. + */ + public PrivateEndpointServiceConnectionStatus status() { + return this.status; + } + + /** + * Set the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the + * service. + * + * @param status the status value to set. + * @return the PrivateLinkServiceConnectionState object itself. + */ + public PrivateLinkServiceConnectionState withStatus(PrivateEndpointServiceConnectionStatus status) { + this.status = status; + return this; + } + + /** + * Get the description property: The reason for approval/rejection of the connection. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The reason for approval/rejection of the connection. + * + * @param description the description value to set. + * @return the PrivateLinkServiceConnectionState object itself. + */ + public PrivateLinkServiceConnectionState withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the actionsRequired property: A message indicating if changes on the service provider require any updates on + * the consumer. + * + * @return the actionsRequired value. + */ + public String actionsRequired() { + return this.actionsRequired; + } + + /** + * Set the actionsRequired property: A message indicating if changes on the service provider require any updates on + * the consumer. + * + * @param actionsRequired the actionsRequired value to set. + * @return the PrivateLinkServiceConnectionState object itself. + */ + public PrivateLinkServiceConnectionState withActionsRequired(String actionsRequired) { + this.actionsRequired = actionsRequired; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeStringField("actionsRequired", this.actionsRequired); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of PrivateLinkServiceConnectionState from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of PrivateLinkServiceConnectionState if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the PrivateLinkServiceConnectionState. + */ + public static PrivateLinkServiceConnectionState fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + PrivateLinkServiceConnectionState deserializedPrivateLinkServiceConnectionState + = new PrivateLinkServiceConnectionState(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("status".equals(fieldName)) { + deserializedPrivateLinkServiceConnectionState.status + = PrivateEndpointServiceConnectionStatus.fromString(reader.getString()); + } else if ("description".equals(fieldName)) { + deserializedPrivateLinkServiceConnectionState.description = reader.getString(); + } else if ("actionsRequired".equals(fieldName)) { + deserializedPrivateLinkServiceConnectionState.actionsRequired = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedPrivateLinkServiceConnectionState; + }); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Profile.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Profile.java new file mode 100644 index 000000000000..ce136a414890 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Profile.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Information about profile. + */ +@Immutable +public final class Profile implements JsonSerializable { + /* + * Name of the profile + */ + private String name; + + /* + * Current access rules version + */ + private Long accessRulesVersion; + + /* + * List of Access Rules + */ + private List accessRules; + + /* + * Current diagnostic settings version + */ + private Long diagnosticSettingsVersion; + + /* + * List of log categories + */ + private List enabledLogCategories; + + /** + * Creates an instance of Profile class. + */ + private Profile() { + } + + /** + * Get the name property: Name of the profile. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the accessRulesVersion property: Current access rules version. + * + * @return the accessRulesVersion value. + */ + public Long accessRulesVersion() { + return this.accessRulesVersion; + } + + /** + * Get the accessRules property: List of Access Rules. + * + * @return the accessRules value. + */ + public List accessRules() { + return this.accessRules; + } + + /** + * Get the diagnosticSettingsVersion property: Current diagnostic settings version. + * + * @return the diagnosticSettingsVersion value. + */ + public Long diagnosticSettingsVersion() { + return this.diagnosticSettingsVersion; + } + + /** + * Get the enabledLogCategories property: List of log categories. + * + * @return the enabledLogCategories value. + */ + public List enabledLogCategories() { + return this.enabledLogCategories; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeNumberField("accessRulesVersion", this.accessRulesVersion); + jsonWriter.writeArrayField("accessRules", this.accessRules, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeNumberField("diagnosticSettingsVersion", this.diagnosticSettingsVersion); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of Profile from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of Profile if the JsonReader was pointing to an instance of it, or null if it was pointing to + * JSON null. + * @throws IOException If an error occurs while reading the Profile. + */ + public static Profile fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + Profile deserializedProfile = new Profile(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedProfile.name = reader.getString(); + } else if ("accessRulesVersion".equals(fieldName)) { + deserializedProfile.accessRulesVersion = reader.getNullable(JsonReader::getLong); + } else if ("accessRules".equals(fieldName)) { + List accessRules = reader.readArray(reader1 -> NspAccessRule.fromJson(reader1)); + deserializedProfile.accessRules = accessRules; + } else if ("diagnosticSettingsVersion".equals(fieldName)) { + deserializedProfile.diagnosticSettingsVersion = reader.getNullable(JsonReader::getLong); + } else if ("enabledLogCategories".equals(fieldName)) { + List enabledLogCategories = reader.readArray(reader1 -> reader1.getString()); + deserializedProfile.enabledLogCategories = enabledLogCategories; + } else { + reader.skipChildren(); + } + } + + return deserializedProfile; + }); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ProvisioningIssue.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ProvisioningIssue.java new file mode 100644 index 000000000000..37a881c57868 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ProvisioningIssue.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Describes Provisioning issue for given Network Security Perimeter configuration. + */ +@Immutable +public final class ProvisioningIssue implements JsonSerializable { + /* + * Name of the issue + */ + private String name; + + /* + * Properties of Provisioning Issue + */ + private ProvisioningIssueProperties properties; + + /** + * Creates an instance of ProvisioningIssue class. + */ + private ProvisioningIssue() { + } + + /** + * Get the name property: Name of the issue. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the properties property: Properties of Provisioning Issue. + * + * @return the properties value. + */ + public ProvisioningIssueProperties properties() { + return this.properties; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProvisioningIssue from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProvisioningIssue if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ProvisioningIssue. + */ + public static ProvisioningIssue fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProvisioningIssue deserializedProvisioningIssue = new ProvisioningIssue(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedProvisioningIssue.name = reader.getString(); + } else if ("properties".equals(fieldName)) { + deserializedProvisioningIssue.properties = ProvisioningIssueProperties.fromJson(reader); + } else { + reader.skipChildren(); + } + } + + return deserializedProvisioningIssue; + }); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ProvisioningIssueProperties.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ProvisioningIssueProperties.java new file mode 100644 index 000000000000..9ed36a14e3a0 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ProvisioningIssueProperties.java @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * Properties of Provisioning Issue. + */ +@Immutable +public final class ProvisioningIssueProperties implements JsonSerializable { + /* + * Type of Issue + */ + private String issueType; + + /* + * Provisioning state of Network Security Perimeter configuration propagation + */ + private Severity severity; + + /* + * Description of the issue + */ + private String description; + + /* + * ARM IDs of resources that can be associated to the same perimeter to remediate the issue. + */ + private List suggestedResourceIds; + + /* + * Access rules that can be added to the same profile to remediate the issue. + */ + private List suggestedAccessRules; + + /** + * Creates an instance of ProvisioningIssueProperties class. + */ + private ProvisioningIssueProperties() { + } + + /** + * Get the issueType property: Type of Issue. + * + * @return the issueType value. + */ + public String issueType() { + return this.issueType; + } + + /** + * Get the severity property: Provisioning state of Network Security Perimeter configuration propagation. + * + * @return the severity value. + */ + public Severity severity() { + return this.severity; + } + + /** + * Get the description property: Description of the issue. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Get the suggestedResourceIds property: ARM IDs of resources that can be associated to the same perimeter to + * remediate the issue. + * + * @return the suggestedResourceIds value. + */ + public List suggestedResourceIds() { + return this.suggestedResourceIds; + } + + /** + * Get the suggestedAccessRules property: Access rules that can be added to the same profile to remediate the issue. + * + * @return the suggestedAccessRules value. + */ + public List suggestedAccessRules() { + return this.suggestedAccessRules; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("issueType", this.issueType); + jsonWriter.writeStringField("severity", this.severity == null ? null : this.severity.toString()); + jsonWriter.writeStringField("description", this.description); + jsonWriter.writeArrayField("suggestedAccessRules", this.suggestedAccessRules, + (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ProvisioningIssueProperties from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ProvisioningIssueProperties if the JsonReader was pointing to an instance of it, or null + * if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the ProvisioningIssueProperties. + */ + public static ProvisioningIssueProperties fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ProvisioningIssueProperties deserializedProvisioningIssueProperties = new ProvisioningIssueProperties(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("issueType".equals(fieldName)) { + deserializedProvisioningIssueProperties.issueType = reader.getString(); + } else if ("severity".equals(fieldName)) { + deserializedProvisioningIssueProperties.severity = Severity.fromString(reader.getString()); + } else if ("description".equals(fieldName)) { + deserializedProvisioningIssueProperties.description = reader.getString(); + } else if ("suggestedResourceIds".equals(fieldName)) { + List suggestedResourceIds = reader.readArray(reader1 -> reader1.getString()); + deserializedProvisioningIssueProperties.suggestedResourceIds = suggestedResourceIds; + } else if ("suggestedAccessRules".equals(fieldName)) { + List suggestedAccessRules + = reader.readArray(reader1 -> NspAccessRule.fromJson(reader1)); + deserializedProvisioningIssueProperties.suggestedAccessRules = suggestedAccessRules; + } else { + reader.skipChildren(); + } + } + + return deserializedProvisioningIssueProperties; + }); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ProvisioningState.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ProvisioningState.java new file mode 100644 index 000000000000..be02b1bea522 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ProvisioningState.java @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines values for ProvisioningState. + */ +public final class ProvisioningState extends ExpandableStringEnum { + /** + * Static value Creating for ProvisioningState. + */ + public static final ProvisioningState CREATING = fromString("Creating"); + + /** + * Static value Updating for ProvisioningState. + */ + public static final ProvisioningState UPDATING = fromString("Updating"); + + /** + * Static value Accepted for ProvisioningState. + */ + public static final ProvisioningState ACCEPTED = fromString("Accepted"); + + /** + * Static value Succeeded for ProvisioningState. + */ + public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for ProvisioningState. + */ + public static final ProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Deleting for ProvisioningState. + */ + public static final ProvisioningState DELETING = fromString("Deleting"); + + /** + * Creates a new instance of ProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ProvisioningState() { + } + + /** + * Creates or finds a ProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProvisioningState. + */ + public static ProvisioningState fromString(String name) { + return fromString(name, ProvisioningState.class); + } + + /** + * Gets known ProvisioningState values. + * + * @return known ProvisioningState values. + */ + public static Collection values() { + return values(ProvisioningState.class); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PublicNetworkAccess.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PublicNetworkAccess.java index 6de6918dcbd8..3b00358e0d45 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PublicNetworkAccess.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/PublicNetworkAccess.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -21,6 +21,11 @@ public final class PublicNetworkAccess extends ExpandableStringEnum getWithResponse(QnAMakerEndpointKeysRequestBody parameters, Context context); + + /** + * Lists the QnA Maker endpoint keys. + * + * @param parameters The request body. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return schema for EndpointKeys generate/refresh operations. + */ + QnAMakerEndpointKeysResponse get(QnAMakerEndpointKeysRequestBody parameters); +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/QnAMakerEndpointKeysRequestBody.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/QnAMakerEndpointKeysRequestBody.java new file mode 100644 index 000000000000..e6d59ae02e2b --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/QnAMakerEndpointKeysRequestBody.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.models; + +import com.azure.core.annotation.Fluent; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * The request body for a request to Bot Service Management to list QnA Maker endpoint keys. + */ +@Fluent +public final class QnAMakerEndpointKeysRequestBody implements JsonSerializable { + /* + * the host name of the QnA Maker endpoint + */ + private String hostname; + + /* + * Subscription key which provides access to this API. + */ + private String authkey; + + /** + * Creates an instance of QnAMakerEndpointKeysRequestBody class. + */ + public QnAMakerEndpointKeysRequestBody() { + } + + /** + * Get the hostname property: the host name of the QnA Maker endpoint. + * + * @return the hostname value. + */ + public String hostname() { + return this.hostname; + } + + /** + * Set the hostname property: the host name of the QnA Maker endpoint. + * + * @param hostname the hostname value to set. + * @return the QnAMakerEndpointKeysRequestBody object itself. + */ + public QnAMakerEndpointKeysRequestBody withHostname(String hostname) { + this.hostname = hostname; + return this; + } + + /** + * Get the authkey property: Subscription key which provides access to this API. + * + * @return the authkey value. + */ + public String authkey() { + return this.authkey; + } + + /** + * Set the authkey property: Subscription key which provides access to this API. + * + * @param authkey the authkey value to set. + * @return the QnAMakerEndpointKeysRequestBody object itself. + */ + public QnAMakerEndpointKeysRequestBody withAuthkey(String authkey) { + this.authkey = authkey; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("hostname", this.hostname); + jsonWriter.writeStringField("authkey", this.authkey); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of QnAMakerEndpointKeysRequestBody from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of QnAMakerEndpointKeysRequestBody if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the QnAMakerEndpointKeysRequestBody. + */ + public static QnAMakerEndpointKeysRequestBody fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + QnAMakerEndpointKeysRequestBody deserializedQnAMakerEndpointKeysRequestBody + = new QnAMakerEndpointKeysRequestBody(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("hostname".equals(fieldName)) { + deserializedQnAMakerEndpointKeysRequestBody.hostname = reader.getString(); + } else if ("authkey".equals(fieldName)) { + deserializedQnAMakerEndpointKeysRequestBody.authkey = reader.getString(); + } else { + reader.skipChildren(); + } + } + + return deserializedQnAMakerEndpointKeysRequestBody; + }); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/QnAMakerEndpointKeysResponse.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/QnAMakerEndpointKeysResponse.java new file mode 100644 index 000000000000..7f06b739ee56 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/QnAMakerEndpointKeysResponse.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.models; + +import com.azure.resourcemanager.botservice.fluent.models.QnAMakerEndpointKeysResponseInner; + +/** + * An immutable client-side representation of QnAMakerEndpointKeysResponse. + */ +public interface QnAMakerEndpointKeysResponse { + /** + * Gets the primaryEndpointKey property: Primary Access Key. + * + * @return the primaryEndpointKey value. + */ + String primaryEndpointKey(); + + /** + * Gets the secondaryEndpointKey property: Secondary Access Key. + * + * @return the secondaryEndpointKey value. + */ + String secondaryEndpointKey(); + + /** + * Gets the installedVersion property: Current version of runtime. + * + * @return the installedVersion value. + */ + String installedVersion(); + + /** + * Gets the lastStableVersion property: Latest version of runtime. + * + * @return the lastStableVersion value. + */ + String lastStableVersion(); + + /** + * Gets the inner com.azure.resourcemanager.botservice.fluent.models.QnAMakerEndpointKeysResponseInner object. + * + * @return the inner object. + */ + QnAMakerEndpointKeysResponseInner innerModel(); +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/RegenerateKeysChannelName.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/RegenerateKeysChannelName.java index 8c20bdf36094..8d2f389f0cf4 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/RegenerateKeysChannelName.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/RegenerateKeysChannelName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ResourceAssociation.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ResourceAssociation.java new file mode 100644 index 000000000000..93864ccbf6ca --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ResourceAssociation.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.models; + +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Information about resource association. + */ +@Immutable +public final class ResourceAssociation implements JsonSerializable { + /* + * Name of the resource association + */ + private String name; + + /* + * Access Mode of the resource association + */ + private AccessMode accessMode; + + /** + * Creates an instance of ResourceAssociation class. + */ + private ResourceAssociation() { + } + + /** + * Get the name property: Name of the resource association. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the accessMode property: Access Mode of the resource association. + * + * @return the accessMode value. + */ + public AccessMode accessMode() { + return this.accessMode; + } + + /** + * {@inheritDoc} + */ + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("name", this.name); + jsonWriter.writeStringField("accessMode", this.accessMode == null ? null : this.accessMode.toString()); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of ResourceAssociation from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of ResourceAssociation if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IOException If an error occurs while reading the ResourceAssociation. + */ + public static ResourceAssociation fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + ResourceAssociation deserializedResourceAssociation = new ResourceAssociation(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("name".equals(fieldName)) { + deserializedResourceAssociation.name = reader.getString(); + } else if ("accessMode".equals(fieldName)) { + deserializedResourceAssociation.accessMode = AccessMode.fromString(reader.getString()); + } else { + reader.skipChildren(); + } + } + + return deserializedResourceAssociation; + }); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/SearchAssistant.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/SearchAssistant.java index de0cdd8cf3a1..eca9499f317c 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/SearchAssistant.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/SearchAssistant.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -54,15 +54,6 @@ public SearchAssistant withLocation(String location) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ServiceProvider.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ServiceProvider.java index ececcacc214b..e7164cb5774b 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ServiceProvider.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ServiceProvider.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * Service Provider Definition. */ -@Fluent +@Immutable public final class ServiceProvider implements JsonSerializable { /* * The Properties of a Service Provider Object @@ -24,7 +24,7 @@ public final class ServiceProvider implements JsonSerializable /** * Creates an instance of ServiceProvider class. */ - public ServiceProvider() { + private ServiceProvider() { } /** @@ -36,28 +36,6 @@ public ServiceProviderProperties properties() { return this.properties; } - /** - * Set the properties property: The Properties of a Service Provider Object. - * - * @param properties the properties value to set. - * @return the ServiceProvider object itself. - */ - public ServiceProvider withProperties(ServiceProviderProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ServiceProviderParameter.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ServiceProviderParameter.java index d0fa5dcfa51b..ad0626bff311 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ServiceProviderParameter.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ServiceProviderParameter.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -54,7 +54,7 @@ public final class ServiceProviderParameter implements JsonSerializable { /* * the constraints of the bot meta data. @@ -24,7 +24,7 @@ public final class ServiceProviderParameterMetadata implements JsonSerializable< /** * Creates an instance of ServiceProviderParameterMetadata class. */ - public ServiceProviderParameterMetadata() { + private ServiceProviderParameterMetadata() { } /** @@ -36,28 +36,6 @@ public ServiceProviderParameterMetadataConstraints constraints() { return this.constraints; } - /** - * Set the constraints property: the constraints of the bot meta data. - * - * @param constraints the constraints value to set. - * @return the ServiceProviderParameterMetadata object itself. - */ - public ServiceProviderParameterMetadata withConstraints(ServiceProviderParameterMetadataConstraints constraints) { - this.constraints = constraints; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (constraints() != null) { - constraints().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ServiceProviderParameterMetadataConstraints.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ServiceProviderParameterMetadataConstraints.java index 5924eb7be2e3..b5059e8565a8 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ServiceProviderParameterMetadataConstraints.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ServiceProviderParameterMetadataConstraints.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -14,7 +14,7 @@ /** * the constraints of the bot meta data. */ -@Fluent +@Immutable public final class ServiceProviderParameterMetadataConstraints implements JsonSerializable { /* @@ -25,7 +25,7 @@ public final class ServiceProviderParameterMetadataConstraints /** * Creates an instance of ServiceProviderParameterMetadataConstraints class. */ - public ServiceProviderParameterMetadataConstraints() { + private ServiceProviderParameterMetadataConstraints() { } /** @@ -37,25 +37,6 @@ public Boolean required() { return this.required; } - /** - * Set the required property: Whether required the constraints of the bot meta data. - * - * @param required the required value to set. - * @return the ServiceProviderParameterMetadataConstraints object itself. - */ - public ServiceProviderParameterMetadataConstraints withRequired(Boolean required) { - this.required = required; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ServiceProviderProperties.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ServiceProviderProperties.java index a2788c6255d6..6f29f9342566 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ServiceProviderProperties.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ServiceProviderProperties.java @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -15,7 +15,7 @@ /** * The Object used to describe a Service Provider supported by Bot Service. */ -@Fluent +@Immutable public final class ServiceProviderProperties implements JsonSerializable { /* * Id for Service Provider @@ -50,7 +50,7 @@ public final class ServiceProviderProperties implements JsonSerializable parameters() { return this.parameters; } - /** - * Set the parameters property: The list of parameters for the Service Provider. - * - * @param parameters the parameters value to set. - * @return the ServiceProviderProperties object itself. - */ - public ServiceProviderProperties withParameters(List parameters) { - this.parameters = parameters; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (parameters() != null) { - parameters().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ServiceProviderResponseList.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ServiceProviderResponseList.java index 4f6545cce498..1d1cd873abae 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ServiceProviderResponseList.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/ServiceProviderResponseList.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Severity.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Severity.java new file mode 100644 index 000000000000..15f1d45029d2 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Severity.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.models; + +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Provisioning state of Network Security Perimeter configuration propagation. + */ +public final class Severity extends ExpandableStringEnum { + /** + * Static value Warning for Severity. + */ + public static final Severity WARNING = fromString("Warning"); + + /** + * Static value Error for Severity. + */ + public static final Severity ERROR = fromString("Error"); + + /** + * Creates a new instance of Severity value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Severity() { + } + + /** + * Creates or finds a Severity from its string representation. + * + * @param name a name to look for. + * @return the corresponding Severity. + */ + public static Severity fromString(String name) { + return fromString(name, Severity.class); + } + + /** + * Gets known Severity values. + * + * @return known Severity values. + */ + public static Collection values() { + return values(Severity.class); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Site.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Site.java index 42604c4d69f9..a10372116176 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Site.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Site.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -76,7 +75,7 @@ public class Site implements JsonSerializable { /* * Entity Tag */ - private String etag; + private String eTag; /* * DirectLine application id @@ -344,22 +343,22 @@ public Site withIsNoStorageEnabled(Boolean isNoStorageEnabled) { } /** - * Get the etag property: Entity Tag. + * Get the eTag property: Entity Tag. * - * @return the etag value. + * @return the eTag value. */ - public String etag() { - return this.etag; + public String eTag() { + return this.eTag; } /** - * Set the etag property: Entity Tag. + * Set the eTag property: Entity Tag. * - * @param etag the etag value to set. + * @param eTag the eTag value to set. * @return the Site object itself. */ - public Site withEtag(String etag) { - this.etag = etag; + public Site withETag(String eTag) { + this.eTag = eTag; return this; } @@ -505,20 +504,6 @@ public Site withIsWebchatPreviewEnabled(Boolean isWebchatPreviewEnabled) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (siteName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property siteName in model Site")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(Site.class); - /** * {@inheritDoc} */ @@ -532,7 +517,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeBooleanField("isDetailedLoggingEnabled", this.isDetailedLoggingEnabled); jsonWriter.writeBooleanField("isBlockUserUploadEnabled", this.isBlockUserUploadEnabled); jsonWriter.writeBooleanField("isNoStorageEnabled", this.isNoStorageEnabled); - jsonWriter.writeStringField("eTag", this.etag); + jsonWriter.writeStringField("eTag", this.eTag); jsonWriter.writeStringField("appId", this.appId); jsonWriter.writeBooleanField("isV1Enabled", this.isV1Enabled); jsonWriter.writeBooleanField("isV3Enabled", this.isV3Enabled); @@ -583,7 +568,7 @@ public static Site fromJson(JsonReader jsonReader) throws IOException { } else if ("isNoStorageEnabled".equals(fieldName)) { deserializedSite.isNoStorageEnabled = reader.getNullable(JsonReader::getBoolean); } else if ("eTag".equals(fieldName)) { - deserializedSite.etag = reader.getString(); + deserializedSite.eTag = reader.getString(); } else if ("appId".equals(fieldName)) { deserializedSite.appId = reader.getString(); } else if ("isV1Enabled".equals(fieldName)) { diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/SiteInfo.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/SiteInfo.java index decbfcaf7153..801e63be9f23 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/SiteInfo.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/SiteInfo.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -73,23 +72,6 @@ public SiteInfo withKey(Key key) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (siteName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property siteName in model SiteInfo")); - } - if (key() == null) { - throw LOGGER.atError().log(new IllegalArgumentException("Missing required property key in model SiteInfo")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SiteInfo.class); - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Sku.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Sku.java index 9e84e0063e2f..c11244c4e5d8 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Sku.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/Sku.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -62,19 +61,6 @@ public SkuTier tier() { return this.tier; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.atError().log(new IllegalArgumentException("Missing required property name in model Sku")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(Sku.class); - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/SkuName.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/SkuName.java index d3404de525b9..dbc9cd61924a 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/SkuName.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/SkuName.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/SkuTier.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/SkuTier.java index 4a1483b0a058..968c0c2d8929 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/SkuTier.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/SkuTier.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/SkypeChannel.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/SkypeChannel.java index 4f6dd99fa4c5..33cad5cbc393 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/SkypeChannel.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/SkypeChannel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -79,18 +79,6 @@ public SkypeChannel withLocation(String location) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/SkypeChannelProperties.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/SkypeChannelProperties.java index 003d3ac26f40..5796861859e4 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/SkypeChannelProperties.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/SkypeChannelProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -54,7 +54,7 @@ public final class SkypeChannelProperties implements JsonSerializable e.validate()); - } - if (apiConfigurations() != null) { - apiConfigurations().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ @@ -225,7 +211,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("cognitiveServiceSubscriptionKey", this.cognitiveServiceSubscriptionKey); jsonWriter.writeStringField("cognitiveServiceRegion", this.cognitiveServiceRegion); jsonWriter.writeStringField("defaultLocale", this.defaultLocale); - jsonWriter.writeStringField("premiumSKU", this.premiumSku); + jsonWriter.writeStringField("premiumSKU", this.premiumSKU); jsonWriter.writeBooleanField("isEnabled", this.isEnabled); return jsonWriter.writeEndObject(); } @@ -260,7 +246,7 @@ public static TelephonyChannelProperties fromJson(JsonReader jsonReader) throws } else if ("defaultLocale".equals(fieldName)) { deserializedTelephonyChannelProperties.defaultLocale = reader.getString(); } else if ("premiumSKU".equals(fieldName)) { - deserializedTelephonyChannelProperties.premiumSku = reader.getString(); + deserializedTelephonyChannelProperties.premiumSKU = reader.getString(); } else if ("isEnabled".equals(fieldName)) { deserializedTelephonyChannelProperties.isEnabled = reader.getNullable(JsonReader::getBoolean); } else { diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/TelephonyChannelResourceApiConfiguration.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/TelephonyChannelResourceApiConfiguration.java index 54e4f2abc349..3c787ebdbb35 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/TelephonyChannelResourceApiConfiguration.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/TelephonyChannelResourceApiConfiguration.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -174,14 +174,6 @@ public TelephonyChannelResourceApiConfiguration withDefaultLocale(String default return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/TelephonyPhoneNumbers.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/TelephonyPhoneNumbers.java index 8d4dda724b67..7e61fcb0765e 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/TelephonyPhoneNumbers.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/TelephonyPhoneNumbers.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -272,14 +272,6 @@ public TelephonyPhoneNumbers withOfferType(String offerType) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/WebChatChannel.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/WebChatChannel.java index 20ce5156f2b6..bfe517bb3752 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/WebChatChannel.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/WebChatChannel.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -79,18 +79,6 @@ public WebChatChannel withLocation(String location) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/WebChatChannelProperties.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/WebChatChannelProperties.java index cb626a401e13..767baa95d375 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/WebChatChannelProperties.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/WebChatChannelProperties.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; @@ -62,17 +62,6 @@ public WebChatChannelProperties withSites(List sites) { return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sites() != null) { - sites().forEach(e -> e.validate()); - } - } - /** * {@inheritDoc} */ diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/WebChatSite.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/WebChatSite.java index adc533029e32..eef2d5b25314 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/WebChatSite.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/WebChatSite.java @@ -1,11 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -152,8 +151,8 @@ public WebChatSite withIsNoStorageEnabled(Boolean isNoStorageEnabled) { * {@inheritDoc} */ @Override - public WebChatSite withEtag(String etag) { - super.withEtag(etag); + public WebChatSite withETag(String eTag) { + super.withETag(eTag); return this; } @@ -220,21 +219,6 @@ public WebChatSite withIsWebchatPreviewEnabled(Boolean isWebchatPreviewEnabled) return this; } - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (siteName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property siteName in model WebChatSite")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(WebChatSite.class); - /** * {@inheritDoc} */ @@ -248,7 +232,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeBooleanField("isDetailedLoggingEnabled", isDetailedLoggingEnabled()); jsonWriter.writeBooleanField("isBlockUserUploadEnabled", isBlockUserUploadEnabled()); jsonWriter.writeBooleanField("isNoStorageEnabled", isNoStorageEnabled()); - jsonWriter.writeStringField("eTag", etag()); + jsonWriter.writeStringField("eTag", eTag()); jsonWriter.writeStringField("appId", appId()); jsonWriter.writeBooleanField("isV1Enabled", isV1Enabled()); jsonWriter.writeBooleanField("isV3Enabled", isV3Enabled()); @@ -299,7 +283,7 @@ public static WebChatSite fromJson(JsonReader jsonReader) throws IOException { } else if ("isNoStorageEnabled".equals(fieldName)) { deserializedWebChatSite.withIsNoStorageEnabled(reader.getNullable(JsonReader::getBoolean)); } else if ("eTag".equals(fieldName)) { - deserializedWebChatSite.withEtag(reader.getString()); + deserializedWebChatSite.withETag(reader.getString()); } else if ("appId".equals(fieldName)) { deserializedWebChatSite.withAppId(reader.getString()); } else if ("isV1Enabled".equals(fieldName)) { diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/package-info.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/package-info.java index ab2e117c6e43..d4bbb854f2a5 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/package-info.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/models/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the data models for AzureBotService. + * Package containing the data models for BotService. * Azure Bot Service is a platform for creating smart conversational agents. */ package com.azure.resourcemanager.botservice.models; diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/package-info.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/package-info.java index 47c555a4c305..52713dfd3b2d 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/package-info.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/com/azure/resourcemanager/botservice/package-info.java @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. /** - * Package containing the classes for AzureBotService. + * Package containing the classes for BotService. * Azure Bot Service is a platform for creating smart conversational agents. */ package com.azure.resourcemanager.botservice; diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/module-info.java b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/module-info.java index 1cb74ae0037b..40d10b858262 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/java/module-info.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/java/module-info.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. module com.azure.resourcemanager.botservice { requires transitive com.azure.core.management; @@ -12,4 +12,5 @@ opens com.azure.resourcemanager.botservice.fluent.models to com.azure.core; opens com.azure.resourcemanager.botservice.models to com.azure.core; + opens com.azure.resourcemanager.botservice.implementation.models to com.azure.core; } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/resources/META-INF/azure-resourcemanager-botservice_metadata.json b/sdk/botservice/azure-resourcemanager-botservice/src/main/resources/META-INF/azure-resourcemanager-botservice_metadata.json new file mode 100644 index 000000000000..c0f6a791646f --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/resources/META-INF/azure-resourcemanager-botservice_metadata.json @@ -0,0 +1 @@ +{"flavor":"azure","apiVersions":{"Microsoft.BotService":"2023-09-15-preview"},"crossLanguageDefinitions":{"com.azure.resourcemanager.botservice.fluent.BotConnectionsClient":"Microsoft.BotService","com.azure.resourcemanager.botservice.fluent.BotConnectionsClient.create":"Microsoft.BotService.ConnectionSettings.create","com.azure.resourcemanager.botservice.fluent.BotConnectionsClient.createWithResponse":"Microsoft.BotService.ConnectionSettings.create","com.azure.resourcemanager.botservice.fluent.BotConnectionsClient.delete":"Microsoft.BotService.ConnectionSettings.delete","com.azure.resourcemanager.botservice.fluent.BotConnectionsClient.deleteWithResponse":"Microsoft.BotService.ConnectionSettings.delete","com.azure.resourcemanager.botservice.fluent.BotConnectionsClient.get":"Microsoft.BotService.ConnectionSettings.get","com.azure.resourcemanager.botservice.fluent.BotConnectionsClient.getWithResponse":"Microsoft.BotService.ConnectionSettings.get","com.azure.resourcemanager.botservice.fluent.BotConnectionsClient.listByBotService":"Microsoft.BotService.ConnectionSettings.listByBotService","com.azure.resourcemanager.botservice.fluent.BotConnectionsClient.listServiceProviders":"Microsoft.BotService.BotConnectionOperationGroup.listServiceProviders","com.azure.resourcemanager.botservice.fluent.BotConnectionsClient.listServiceProvidersWithResponse":"Microsoft.BotService.BotConnectionOperationGroup.listServiceProviders","com.azure.resourcemanager.botservice.fluent.BotConnectionsClient.listWithSecrets":"Microsoft.BotService.ConnectionSettings.listWithSecrets","com.azure.resourcemanager.botservice.fluent.BotConnectionsClient.listWithSecretsWithResponse":"Microsoft.BotService.ConnectionSettings.listWithSecrets","com.azure.resourcemanager.botservice.fluent.BotConnectionsClient.update":"Microsoft.BotService.ConnectionSettings.update","com.azure.resourcemanager.botservice.fluent.BotConnectionsClient.updateWithResponse":"Microsoft.BotService.ConnectionSettings.update","com.azure.resourcemanager.botservice.fluent.BotServiceManagementClient":"Microsoft.BotService","com.azure.resourcemanager.botservice.fluent.BotsClient":"Microsoft.BotService.Bots","com.azure.resourcemanager.botservice.fluent.BotsClient.create":"Microsoft.BotService.Bots.create","com.azure.resourcemanager.botservice.fluent.BotsClient.createWithResponse":"Microsoft.BotService.Bots.create","com.azure.resourcemanager.botservice.fluent.BotsClient.delete":"Microsoft.BotService.Bots.delete","com.azure.resourcemanager.botservice.fluent.BotsClient.deleteWithResponse":"Microsoft.BotService.Bots.delete","com.azure.resourcemanager.botservice.fluent.BotsClient.getByResourceGroup":"Microsoft.BotService.Bots.get","com.azure.resourcemanager.botservice.fluent.BotsClient.getByResourceGroupWithResponse":"Microsoft.BotService.Bots.get","com.azure.resourcemanager.botservice.fluent.BotsClient.getCheckNameAvailability":"Microsoft.BotService.BotsOperationGroup.getCheckNameAvailability","com.azure.resourcemanager.botservice.fluent.BotsClient.getCheckNameAvailabilityWithResponse":"Microsoft.BotService.BotsOperationGroup.getCheckNameAvailability","com.azure.resourcemanager.botservice.fluent.BotsClient.list":"Microsoft.BotService.Bots.list","com.azure.resourcemanager.botservice.fluent.BotsClient.listByResourceGroup":"Microsoft.BotService.Bots.listByResourceGroup","com.azure.resourcemanager.botservice.fluent.BotsClient.update":"Microsoft.BotService.Bots.update","com.azure.resourcemanager.botservice.fluent.BotsClient.updateWithResponse":"Microsoft.BotService.Bots.update","com.azure.resourcemanager.botservice.fluent.ChannelsClient":"Microsoft.BotService","com.azure.resourcemanager.botservice.fluent.ChannelsClient.create":"Microsoft.BotService.BotChannels.create","com.azure.resourcemanager.botservice.fluent.ChannelsClient.createWithResponse":"Microsoft.BotService.BotChannels.create","com.azure.resourcemanager.botservice.fluent.ChannelsClient.delete":"Microsoft.BotService.BotChannels.delete","com.azure.resourcemanager.botservice.fluent.ChannelsClient.deleteWithResponse":"Microsoft.BotService.BotChannels.delete","com.azure.resourcemanager.botservice.fluent.ChannelsClient.get":"Microsoft.BotService.BotChannels.get","com.azure.resourcemanager.botservice.fluent.ChannelsClient.getWithResponse":"Microsoft.BotService.BotChannels.get","com.azure.resourcemanager.botservice.fluent.ChannelsClient.listByResourceGroup":"Microsoft.BotService.BotChannels.listByResourceGroup","com.azure.resourcemanager.botservice.fluent.ChannelsClient.listWithKeys":"Microsoft.BotService.BotChannels.listWithKeys","com.azure.resourcemanager.botservice.fluent.ChannelsClient.listWithKeysWithResponse":"Microsoft.BotService.BotChannels.listWithKeys","com.azure.resourcemanager.botservice.fluent.ChannelsClient.update":"Microsoft.BotService.BotChannels.update","com.azure.resourcemanager.botservice.fluent.ChannelsClient.updateWithResponse":"Microsoft.BotService.BotChannels.update","com.azure.resourcemanager.botservice.fluent.DirectLinesClient":"Microsoft.BotService","com.azure.resourcemanager.botservice.fluent.DirectLinesClient.regenerateKeys":"Microsoft.BotService.BotChannels.regenerateKeys","com.azure.resourcemanager.botservice.fluent.DirectLinesClient.regenerateKeysWithResponse":"Microsoft.BotService.BotChannels.regenerateKeys","com.azure.resourcemanager.botservice.fluent.EmailsClient":"Microsoft.BotService","com.azure.resourcemanager.botservice.fluent.EmailsClient.createSignInUrl":"Microsoft.BotService.Bots.createSignInUrl","com.azure.resourcemanager.botservice.fluent.EmailsClient.createSignInUrlWithResponse":"Microsoft.BotService.Bots.createSignInUrl","com.azure.resourcemanager.botservice.fluent.HostSettingsClient":"Microsoft.BotService","com.azure.resourcemanager.botservice.fluent.HostSettingsClient.get":"Microsoft.BotService.HostSettingsOperationGroup.get","com.azure.resourcemanager.botservice.fluent.HostSettingsClient.getWithResponse":"Microsoft.BotService.HostSettingsOperationGroup.get","com.azure.resourcemanager.botservice.fluent.NetworkSecurityPerimeterConfigurationsClient":"Microsoft.BotService.NetworkSecurityPerimeterConfigurations","com.azure.resourcemanager.botservice.fluent.NetworkSecurityPerimeterConfigurationsClient.beginReconcile":"Microsoft.BotService.NetworkSecurityPerimeterConfigurations.reconcile","com.azure.resourcemanager.botservice.fluent.NetworkSecurityPerimeterConfigurationsClient.get":"Microsoft.BotService.NetworkSecurityPerimeterConfigurations.get","com.azure.resourcemanager.botservice.fluent.NetworkSecurityPerimeterConfigurationsClient.getWithResponse":"Microsoft.BotService.NetworkSecurityPerimeterConfigurations.get","com.azure.resourcemanager.botservice.fluent.NetworkSecurityPerimeterConfigurationsClient.list":"Microsoft.BotService.NetworkSecurityPerimeterConfigurations.list","com.azure.resourcemanager.botservice.fluent.NetworkSecurityPerimeterConfigurationsClient.reconcile":"Microsoft.BotService.NetworkSecurityPerimeterConfigurations.reconcile","com.azure.resourcemanager.botservice.fluent.OperationResultsClient":"Microsoft.BotService","com.azure.resourcemanager.botservice.fluent.OperationResultsClient.beginGet":"Microsoft.BotService.OperationResultsOperationGroup.get","com.azure.resourcemanager.botservice.fluent.OperationResultsClient.get":"Microsoft.BotService.OperationResultsOperationGroup.get","com.azure.resourcemanager.botservice.fluent.OperationsClient":"Microsoft.BotService.Operations","com.azure.resourcemanager.botservice.fluent.OperationsClient.list":"Azure.ResourceManager.Legacy.Operations.list","com.azure.resourcemanager.botservice.fluent.PrivateEndpointConnectionsClient":"Microsoft.BotService.PrivateEndpointConnections","com.azure.resourcemanager.botservice.fluent.PrivateEndpointConnectionsClient.create":"Microsoft.BotService.PrivateEndpointConnections.create","com.azure.resourcemanager.botservice.fluent.PrivateEndpointConnectionsClient.createWithResponse":"Microsoft.BotService.PrivateEndpointConnections.create","com.azure.resourcemanager.botservice.fluent.PrivateEndpointConnectionsClient.delete":"Microsoft.BotService.PrivateEndpointConnections.delete","com.azure.resourcemanager.botservice.fluent.PrivateEndpointConnectionsClient.deleteWithResponse":"Microsoft.BotService.PrivateEndpointConnections.delete","com.azure.resourcemanager.botservice.fluent.PrivateEndpointConnectionsClient.get":"Microsoft.BotService.PrivateEndpointConnections.get","com.azure.resourcemanager.botservice.fluent.PrivateEndpointConnectionsClient.getWithResponse":"Microsoft.BotService.PrivateEndpointConnections.get","com.azure.resourcemanager.botservice.fluent.PrivateEndpointConnectionsClient.list":"Microsoft.BotService.PrivateEndpointConnections.list","com.azure.resourcemanager.botservice.fluent.PrivateLinkResourcesClient":"Microsoft.BotService","com.azure.resourcemanager.botservice.fluent.PrivateLinkResourcesClient.listByBotResource":"Microsoft.BotService.Bots.listByBotResource","com.azure.resourcemanager.botservice.fluent.PrivateLinkResourcesClient.listByBotResourceWithResponse":"Microsoft.BotService.Bots.listByBotResource","com.azure.resourcemanager.botservice.fluent.QnAMakerEndpointKeysClient":"Microsoft.BotService","com.azure.resourcemanager.botservice.fluent.QnAMakerEndpointKeysClient.get":"Microsoft.BotService.QnAMakerEndpointKeysOperationGroup.get","com.azure.resourcemanager.botservice.fluent.QnAMakerEndpointKeysClient.getWithResponse":"Microsoft.BotService.QnAMakerEndpointKeysOperationGroup.get","com.azure.resourcemanager.botservice.fluent.models.BotChannelInner":"Microsoft.BotService.BotChannel","com.azure.resourcemanager.botservice.fluent.models.BotInner":"Microsoft.BotService.Bot","com.azure.resourcemanager.botservice.fluent.models.CheckNameAvailabilityResponseBodyInner":"Microsoft.BotService.CheckNameAvailabilityResponseBody","com.azure.resourcemanager.botservice.fluent.models.ConnectionSettingInner":"Microsoft.BotService.ConnectionSetting","com.azure.resourcemanager.botservice.fluent.models.CreateEmailSignInUrlResponseInner":"Microsoft.BotService.CreateEmailSignInUrlResponse","com.azure.resourcemanager.botservice.fluent.models.HostSettingsResponseInner":"Microsoft.BotService.HostSettingsResponse","com.azure.resourcemanager.botservice.fluent.models.ListChannelWithKeysResponseInner":"Microsoft.BotService.ListChannelWithKeysResponse","com.azure.resourcemanager.botservice.fluent.models.NetworkSecurityPerimeterConfigurationInner":"Microsoft.BotService.NetworkSecurityPerimeterConfiguration","com.azure.resourcemanager.botservice.fluent.models.OperationEntityInner":"Microsoft.BotService.OperationEntity","com.azure.resourcemanager.botservice.fluent.models.OperationResultsDescriptionInner":"Microsoft.BotService.OperationResultsDescription","com.azure.resourcemanager.botservice.fluent.models.PrivateEndpointConnectionInner":"Microsoft.BotService.PrivateEndpointConnection","com.azure.resourcemanager.botservice.fluent.models.PrivateEndpointConnectionProperties":"Microsoft.BotService.PrivateEndpointConnectionProperties","com.azure.resourcemanager.botservice.fluent.models.PrivateLinkResourceListResultInner":"Microsoft.BotService.PrivateLinkResourceListResult","com.azure.resourcemanager.botservice.fluent.models.PrivateLinkResourceProperties":"Microsoft.BotService.PrivateLinkResourceProperties","com.azure.resourcemanager.botservice.fluent.models.QnAMakerEndpointKeysResponseInner":"Microsoft.BotService.QnAMakerEndpointKeysResponse","com.azure.resourcemanager.botservice.fluent.models.ServiceProviderResponseListInner":"Microsoft.BotService.ServiceProviderResponseList","com.azure.resourcemanager.botservice.implementation.BotServiceManagementClientBuilder":"Microsoft.BotService","com.azure.resourcemanager.botservice.implementation.models.BotResponseList":"Microsoft.BotService.BotResponseList","com.azure.resourcemanager.botservice.implementation.models.ChannelResponseList":"Microsoft.BotService.ChannelResponseList","com.azure.resourcemanager.botservice.implementation.models.ConnectionSettingResponseList":"Microsoft.BotService.ConnectionSettingResponseList","com.azure.resourcemanager.botservice.implementation.models.NetworkSecurityPerimeterConfigurationList":"Microsoft.BotService.NetworkSecurityPerimeterConfigurationList","com.azure.resourcemanager.botservice.implementation.models.OperationEntityListResult":"Microsoft.BotService.OperationEntityListResult","com.azure.resourcemanager.botservice.implementation.models.PrivateEndpointConnectionListResult":"Microsoft.BotService.PrivateEndpointConnectionListResult","com.azure.resourcemanager.botservice.models.AccessMode":"Microsoft.BotService.AccessMode","com.azure.resourcemanager.botservice.models.AcsChatChannel":"Microsoft.BotService.AcsChatChannel","com.azure.resourcemanager.botservice.models.AlexaChannel":"Microsoft.BotService.AlexaChannel","com.azure.resourcemanager.botservice.models.AlexaChannelProperties":"Microsoft.BotService.AlexaChannelProperties","com.azure.resourcemanager.botservice.models.BotProperties":"Microsoft.BotService.BotProperties","com.azure.resourcemanager.botservice.models.Channel":"Microsoft.BotService.Channel","com.azure.resourcemanager.botservice.models.ChannelName":"Microsoft.BotService.ChannelName","com.azure.resourcemanager.botservice.models.ChannelSettings":"Microsoft.BotService.ChannelSettings","com.azure.resourcemanager.botservice.models.CheckNameAvailabilityRequestBody":"Microsoft.BotService.CheckNameAvailabilityRequestBody","com.azure.resourcemanager.botservice.models.ConnectionSettingParameter":"Microsoft.BotService.ConnectionSettingParameter","com.azure.resourcemanager.botservice.models.ConnectionSettingProperties":"Microsoft.BotService.ConnectionSettingProperties","com.azure.resourcemanager.botservice.models.CreateEmailSignInUrlResponseProperties":"Microsoft.BotService.CreateEmailSignInUrlResponseProperties","com.azure.resourcemanager.botservice.models.DirectLineChannel":"Microsoft.BotService.DirectLineChannel","com.azure.resourcemanager.botservice.models.DirectLineChannelProperties":"Microsoft.BotService.DirectLineChannelProperties","com.azure.resourcemanager.botservice.models.DirectLineSite":"Microsoft.BotService.DirectLineSite","com.azure.resourcemanager.botservice.models.DirectLineSpeechChannel":"Microsoft.BotService.DirectLineSpeechChannel","com.azure.resourcemanager.botservice.models.DirectLineSpeechChannelProperties":"Microsoft.BotService.DirectLineSpeechChannelProperties","com.azure.resourcemanager.botservice.models.EmailChannel":"Microsoft.BotService.EmailChannel","com.azure.resourcemanager.botservice.models.EmailChannelAuthMethod":"Microsoft.BotService.EmailChannelAuthMethod","com.azure.resourcemanager.botservice.models.EmailChannelProperties":"Microsoft.BotService.EmailChannelProperties","com.azure.resourcemanager.botservice.models.FacebookChannel":"Microsoft.BotService.FacebookChannel","com.azure.resourcemanager.botservice.models.FacebookChannelProperties":"Microsoft.BotService.FacebookChannelProperties","com.azure.resourcemanager.botservice.models.FacebookPage":"Microsoft.BotService.FacebookPage","com.azure.resourcemanager.botservice.models.Key":"Microsoft.BotService.Key","com.azure.resourcemanager.botservice.models.KikChannel":"Microsoft.BotService.KikChannel","com.azure.resourcemanager.botservice.models.KikChannelProperties":"Microsoft.BotService.KikChannelProperties","com.azure.resourcemanager.botservice.models.Kind":"Microsoft.BotService.Kind","com.azure.resourcemanager.botservice.models.LineChannel":"Microsoft.BotService.LineChannel","com.azure.resourcemanager.botservice.models.LineChannelProperties":"Microsoft.BotService.LineChannelProperties","com.azure.resourcemanager.botservice.models.LineRegistration":"Microsoft.BotService.LineRegistration","com.azure.resourcemanager.botservice.models.M365Extensions":"Microsoft.BotService.M365Extensions","com.azure.resourcemanager.botservice.models.MsTeamsChannel":"Microsoft.BotService.MsTeamsChannel","com.azure.resourcemanager.botservice.models.MsTeamsChannelProperties":"Microsoft.BotService.MsTeamsChannelProperties","com.azure.resourcemanager.botservice.models.MsaAppType":"Microsoft.BotService.MsaAppType","com.azure.resourcemanager.botservice.models.NetworkSecurityPerimeter":"Microsoft.BotService.NetworkSecurityPerimeter","com.azure.resourcemanager.botservice.models.NetworkSecurityPerimeterConfigurationProperties":"Microsoft.BotService.NetworkSecurityPerimeterConfigurationProperties","com.azure.resourcemanager.botservice.models.NspAccessRule":"Microsoft.BotService.NspAccessRule","com.azure.resourcemanager.botservice.models.NspAccessRuleDirection":"Microsoft.BotService.NspAccessRuleDirection","com.azure.resourcemanager.botservice.models.NspAccessRuleProperties":"Microsoft.BotService.NspAccessRuleProperties","com.azure.resourcemanager.botservice.models.NspAccessRulePropertiesSubscriptionsItem":"Microsoft.BotService.NspAccessRulePropertiesSubscriptionsItem","com.azure.resourcemanager.botservice.models.Omnichannel":"Microsoft.BotService.Omnichannel","com.azure.resourcemanager.botservice.models.OperationDisplayInfo":"Microsoft.BotService.OperationDisplayInfo","com.azure.resourcemanager.botservice.models.OperationResultStatus":"Microsoft.BotService.OperationResultStatus","com.azure.resourcemanager.botservice.models.OutlookChannel":"Microsoft.BotService.OutlookChannel","com.azure.resourcemanager.botservice.models.PrivateEndpoint":"Microsoft.BotService.PrivateEndpoint","com.azure.resourcemanager.botservice.models.PrivateEndpointConnectionProvisioningState":"Microsoft.BotService.PrivateEndpointConnectionProvisioningState","com.azure.resourcemanager.botservice.models.PrivateEndpointServiceConnectionStatus":"Microsoft.BotService.PrivateEndpointServiceConnectionStatus","com.azure.resourcemanager.botservice.models.PrivateLinkResource":"Microsoft.BotService.PrivateLinkResource","com.azure.resourcemanager.botservice.models.PrivateLinkResourceBase":"Microsoft.BotService.PrivateLinkResourceBase","com.azure.resourcemanager.botservice.models.PrivateLinkServiceConnectionState":"Microsoft.BotService.PrivateLinkServiceConnectionState","com.azure.resourcemanager.botservice.models.Profile":"Microsoft.BotService.Profile","com.azure.resourcemanager.botservice.models.ProvisioningIssue":"Microsoft.BotService.ProvisioningIssue","com.azure.resourcemanager.botservice.models.ProvisioningIssueProperties":"Microsoft.BotService.ProvisioningIssueProperties","com.azure.resourcemanager.botservice.models.ProvisioningState":"Microsoft.BotService.ProvisioningState","com.azure.resourcemanager.botservice.models.PublicNetworkAccess":"Microsoft.BotService.PublicNetworkAccess","com.azure.resourcemanager.botservice.models.QnAMakerEndpointKeysRequestBody":"Microsoft.BotService.QnAMakerEndpointKeysRequestBody","com.azure.resourcemanager.botservice.models.RegenerateKeysChannelName":"Microsoft.BotService.RegenerateKeysChannelName","com.azure.resourcemanager.botservice.models.ResourceAssociation":"Microsoft.BotService.ResourceAssociation","com.azure.resourcemanager.botservice.models.SearchAssistant":"Microsoft.BotService.SearchAssistant","com.azure.resourcemanager.botservice.models.ServiceProvider":"Microsoft.BotService.ServiceProvider","com.azure.resourcemanager.botservice.models.ServiceProviderParameter":"Microsoft.BotService.ServiceProviderParameter","com.azure.resourcemanager.botservice.models.ServiceProviderParameterMetadata":"Microsoft.BotService.ServiceProviderParameterMetadata","com.azure.resourcemanager.botservice.models.ServiceProviderParameterMetadataConstraints":"Microsoft.BotService.ServiceProviderParameterMetadataConstraints","com.azure.resourcemanager.botservice.models.ServiceProviderProperties":"Microsoft.BotService.ServiceProviderProperties","com.azure.resourcemanager.botservice.models.Severity":"Microsoft.BotService.Severity","com.azure.resourcemanager.botservice.models.Site":"Microsoft.BotService.Site","com.azure.resourcemanager.botservice.models.SiteInfo":"Microsoft.BotService.SiteInfo","com.azure.resourcemanager.botservice.models.Sku":"Microsoft.BotService.Sku","com.azure.resourcemanager.botservice.models.SkuName":"Microsoft.BotService.SkuName","com.azure.resourcemanager.botservice.models.SkuTier":"Microsoft.BotService.SkuTier","com.azure.resourcemanager.botservice.models.SkypeChannel":"Microsoft.BotService.SkypeChannel","com.azure.resourcemanager.botservice.models.SkypeChannelProperties":"Microsoft.BotService.SkypeChannelProperties","com.azure.resourcemanager.botservice.models.SlackChannel":"Microsoft.BotService.SlackChannel","com.azure.resourcemanager.botservice.models.SlackChannelProperties":"Microsoft.BotService.SlackChannelProperties","com.azure.resourcemanager.botservice.models.SmsChannel":"Microsoft.BotService.SmsChannel","com.azure.resourcemanager.botservice.models.SmsChannelProperties":"Microsoft.BotService.SmsChannelProperties","com.azure.resourcemanager.botservice.models.TelegramChannel":"Microsoft.BotService.TelegramChannel","com.azure.resourcemanager.botservice.models.TelegramChannelProperties":"Microsoft.BotService.TelegramChannelProperties","com.azure.resourcemanager.botservice.models.TelephonyChannel":"Microsoft.BotService.TelephonyChannel","com.azure.resourcemanager.botservice.models.TelephonyChannelProperties":"Microsoft.BotService.TelephonyChannelProperties","com.azure.resourcemanager.botservice.models.TelephonyChannelResourceApiConfiguration":"Microsoft.BotService.TelephonyChannelResourceApiConfiguration","com.azure.resourcemanager.botservice.models.TelephonyPhoneNumbers":"Microsoft.BotService.TelephonyPhoneNumbers","com.azure.resourcemanager.botservice.models.WebChatChannel":"Microsoft.BotService.WebChatChannel","com.azure.resourcemanager.botservice.models.WebChatChannelProperties":"Microsoft.BotService.WebChatChannelProperties","com.azure.resourcemanager.botservice.models.WebChatSite":"Microsoft.BotService.WebChatSite"},"generatedFiles":["src/main/java/com/azure/resourcemanager/botservice/BotServiceManager.java","src/main/java/com/azure/resourcemanager/botservice/fluent/BotConnectionsClient.java","src/main/java/com/azure/resourcemanager/botservice/fluent/BotServiceManagementClient.java","src/main/java/com/azure/resourcemanager/botservice/fluent/BotsClient.java","src/main/java/com/azure/resourcemanager/botservice/fluent/ChannelsClient.java","src/main/java/com/azure/resourcemanager/botservice/fluent/DirectLinesClient.java","src/main/java/com/azure/resourcemanager/botservice/fluent/EmailsClient.java","src/main/java/com/azure/resourcemanager/botservice/fluent/HostSettingsClient.java","src/main/java/com/azure/resourcemanager/botservice/fluent/NetworkSecurityPerimeterConfigurationsClient.java","src/main/java/com/azure/resourcemanager/botservice/fluent/OperationResultsClient.java","src/main/java/com/azure/resourcemanager/botservice/fluent/OperationsClient.java","src/main/java/com/azure/resourcemanager/botservice/fluent/PrivateEndpointConnectionsClient.java","src/main/java/com/azure/resourcemanager/botservice/fluent/PrivateLinkResourcesClient.java","src/main/java/com/azure/resourcemanager/botservice/fluent/QnAMakerEndpointKeysClient.java","src/main/java/com/azure/resourcemanager/botservice/fluent/models/BotChannelInner.java","src/main/java/com/azure/resourcemanager/botservice/fluent/models/BotInner.java","src/main/java/com/azure/resourcemanager/botservice/fluent/models/CheckNameAvailabilityResponseBodyInner.java","src/main/java/com/azure/resourcemanager/botservice/fluent/models/ConnectionSettingInner.java","src/main/java/com/azure/resourcemanager/botservice/fluent/models/CreateEmailSignInUrlResponseInner.java","src/main/java/com/azure/resourcemanager/botservice/fluent/models/HostSettingsResponseInner.java","src/main/java/com/azure/resourcemanager/botservice/fluent/models/ListChannelWithKeysResponseInner.java","src/main/java/com/azure/resourcemanager/botservice/fluent/models/NetworkSecurityPerimeterConfigurationInner.java","src/main/java/com/azure/resourcemanager/botservice/fluent/models/OperationEntityInner.java","src/main/java/com/azure/resourcemanager/botservice/fluent/models/OperationResultsDescriptionInner.java","src/main/java/com/azure/resourcemanager/botservice/fluent/models/PrivateEndpointConnectionInner.java","src/main/java/com/azure/resourcemanager/botservice/fluent/models/PrivateEndpointConnectionProperties.java","src/main/java/com/azure/resourcemanager/botservice/fluent/models/PrivateLinkResourceListResultInner.java","src/main/java/com/azure/resourcemanager/botservice/fluent/models/PrivateLinkResourceProperties.java","src/main/java/com/azure/resourcemanager/botservice/fluent/models/QnAMakerEndpointKeysResponseInner.java","src/main/java/com/azure/resourcemanager/botservice/fluent/models/ServiceProviderResponseListInner.java","src/main/java/com/azure/resourcemanager/botservice/fluent/models/package-info.java","src/main/java/com/azure/resourcemanager/botservice/fluent/package-info.java","src/main/java/com/azure/resourcemanager/botservice/implementation/BotChannelImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/BotConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/BotConnectionsImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/BotImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/BotServiceManagementClientBuilder.java","src/main/java/com/azure/resourcemanager/botservice/implementation/BotServiceManagementClientImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/BotsClientImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/BotsImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/ChannelsClientImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/ChannelsImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/CheckNameAvailabilityResponseBodyImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/ConnectionSettingImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/CreateEmailSignInUrlResponseImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/DirectLinesClientImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/DirectLinesImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/EmailsClientImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/EmailsImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/HostSettingsClientImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/HostSettingsImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/HostSettingsResponseImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/ListChannelWithKeysResponseImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/NetworkSecurityPerimeterConfigurationImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/NetworkSecurityPerimeterConfigurationsClientImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/NetworkSecurityPerimeterConfigurationsImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/OperationEntityImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/OperationResultsClientImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/OperationResultsDescriptionImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/OperationResultsImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/OperationsClientImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/OperationsImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateEndpointConnectionImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateEndpointConnectionsClientImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateEndpointConnectionsImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateLinkResourceListResultImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateLinkResourcesClientImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/PrivateLinkResourcesImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/QnAMakerEndpointKeysClientImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/QnAMakerEndpointKeysImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/QnAMakerEndpointKeysResponseImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/ResourceManagerUtils.java","src/main/java/com/azure/resourcemanager/botservice/implementation/ServiceProviderResponseListImpl.java","src/main/java/com/azure/resourcemanager/botservice/implementation/models/BotResponseList.java","src/main/java/com/azure/resourcemanager/botservice/implementation/models/ChannelResponseList.java","src/main/java/com/azure/resourcemanager/botservice/implementation/models/ConnectionSettingResponseList.java","src/main/java/com/azure/resourcemanager/botservice/implementation/models/NetworkSecurityPerimeterConfigurationList.java","src/main/java/com/azure/resourcemanager/botservice/implementation/models/OperationEntityListResult.java","src/main/java/com/azure/resourcemanager/botservice/implementation/models/PrivateEndpointConnectionListResult.java","src/main/java/com/azure/resourcemanager/botservice/implementation/package-info.java","src/main/java/com/azure/resourcemanager/botservice/models/AccessMode.java","src/main/java/com/azure/resourcemanager/botservice/models/AcsChatChannel.java","src/main/java/com/azure/resourcemanager/botservice/models/AlexaChannel.java","src/main/java/com/azure/resourcemanager/botservice/models/AlexaChannelProperties.java","src/main/java/com/azure/resourcemanager/botservice/models/Bot.java","src/main/java/com/azure/resourcemanager/botservice/models/BotChannel.java","src/main/java/com/azure/resourcemanager/botservice/models/BotConnections.java","src/main/java/com/azure/resourcemanager/botservice/models/BotProperties.java","src/main/java/com/azure/resourcemanager/botservice/models/Bots.java","src/main/java/com/azure/resourcemanager/botservice/models/Channel.java","src/main/java/com/azure/resourcemanager/botservice/models/ChannelName.java","src/main/java/com/azure/resourcemanager/botservice/models/ChannelSettings.java","src/main/java/com/azure/resourcemanager/botservice/models/Channels.java","src/main/java/com/azure/resourcemanager/botservice/models/CheckNameAvailabilityRequestBody.java","src/main/java/com/azure/resourcemanager/botservice/models/CheckNameAvailabilityResponseBody.java","src/main/java/com/azure/resourcemanager/botservice/models/ConnectionSetting.java","src/main/java/com/azure/resourcemanager/botservice/models/ConnectionSettingParameter.java","src/main/java/com/azure/resourcemanager/botservice/models/ConnectionSettingProperties.java","src/main/java/com/azure/resourcemanager/botservice/models/CreateEmailSignInUrlResponse.java","src/main/java/com/azure/resourcemanager/botservice/models/CreateEmailSignInUrlResponseProperties.java","src/main/java/com/azure/resourcemanager/botservice/models/DirectLineChannel.java","src/main/java/com/azure/resourcemanager/botservice/models/DirectLineChannelProperties.java","src/main/java/com/azure/resourcemanager/botservice/models/DirectLineSite.java","src/main/java/com/azure/resourcemanager/botservice/models/DirectLineSpeechChannel.java","src/main/java/com/azure/resourcemanager/botservice/models/DirectLineSpeechChannelProperties.java","src/main/java/com/azure/resourcemanager/botservice/models/DirectLines.java","src/main/java/com/azure/resourcemanager/botservice/models/EmailChannel.java","src/main/java/com/azure/resourcemanager/botservice/models/EmailChannelAuthMethod.java","src/main/java/com/azure/resourcemanager/botservice/models/EmailChannelProperties.java","src/main/java/com/azure/resourcemanager/botservice/models/Emails.java","src/main/java/com/azure/resourcemanager/botservice/models/FacebookChannel.java","src/main/java/com/azure/resourcemanager/botservice/models/FacebookChannelProperties.java","src/main/java/com/azure/resourcemanager/botservice/models/FacebookPage.java","src/main/java/com/azure/resourcemanager/botservice/models/HostSettings.java","src/main/java/com/azure/resourcemanager/botservice/models/HostSettingsResponse.java","src/main/java/com/azure/resourcemanager/botservice/models/Key.java","src/main/java/com/azure/resourcemanager/botservice/models/KikChannel.java","src/main/java/com/azure/resourcemanager/botservice/models/KikChannelProperties.java","src/main/java/com/azure/resourcemanager/botservice/models/Kind.java","src/main/java/com/azure/resourcemanager/botservice/models/LineChannel.java","src/main/java/com/azure/resourcemanager/botservice/models/LineChannelProperties.java","src/main/java/com/azure/resourcemanager/botservice/models/LineRegistration.java","src/main/java/com/azure/resourcemanager/botservice/models/ListChannelWithKeysResponse.java","src/main/java/com/azure/resourcemanager/botservice/models/M365Extensions.java","src/main/java/com/azure/resourcemanager/botservice/models/MsTeamsChannel.java","src/main/java/com/azure/resourcemanager/botservice/models/MsTeamsChannelProperties.java","src/main/java/com/azure/resourcemanager/botservice/models/MsaAppType.java","src/main/java/com/azure/resourcemanager/botservice/models/NetworkSecurityPerimeter.java","src/main/java/com/azure/resourcemanager/botservice/models/NetworkSecurityPerimeterConfiguration.java","src/main/java/com/azure/resourcemanager/botservice/models/NetworkSecurityPerimeterConfigurationProperties.java","src/main/java/com/azure/resourcemanager/botservice/models/NetworkSecurityPerimeterConfigurations.java","src/main/java/com/azure/resourcemanager/botservice/models/NspAccessRule.java","src/main/java/com/azure/resourcemanager/botservice/models/NspAccessRuleDirection.java","src/main/java/com/azure/resourcemanager/botservice/models/NspAccessRuleProperties.java","src/main/java/com/azure/resourcemanager/botservice/models/NspAccessRulePropertiesSubscriptionsItem.java","src/main/java/com/azure/resourcemanager/botservice/models/Omnichannel.java","src/main/java/com/azure/resourcemanager/botservice/models/OperationDisplayInfo.java","src/main/java/com/azure/resourcemanager/botservice/models/OperationEntity.java","src/main/java/com/azure/resourcemanager/botservice/models/OperationResultStatus.java","src/main/java/com/azure/resourcemanager/botservice/models/OperationResults.java","src/main/java/com/azure/resourcemanager/botservice/models/OperationResultsDescription.java","src/main/java/com/azure/resourcemanager/botservice/models/Operations.java","src/main/java/com/azure/resourcemanager/botservice/models/OutlookChannel.java","src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpoint.java","src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointConnection.java","src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointConnectionProvisioningState.java","src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointConnections.java","src/main/java/com/azure/resourcemanager/botservice/models/PrivateEndpointServiceConnectionStatus.java","src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkResource.java","src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkResourceBase.java","src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkResourceListResult.java","src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkResources.java","src/main/java/com/azure/resourcemanager/botservice/models/PrivateLinkServiceConnectionState.java","src/main/java/com/azure/resourcemanager/botservice/models/Profile.java","src/main/java/com/azure/resourcemanager/botservice/models/ProvisioningIssue.java","src/main/java/com/azure/resourcemanager/botservice/models/ProvisioningIssueProperties.java","src/main/java/com/azure/resourcemanager/botservice/models/ProvisioningState.java","src/main/java/com/azure/resourcemanager/botservice/models/PublicNetworkAccess.java","src/main/java/com/azure/resourcemanager/botservice/models/QnAMakerEndpointKeys.java","src/main/java/com/azure/resourcemanager/botservice/models/QnAMakerEndpointKeysRequestBody.java","src/main/java/com/azure/resourcemanager/botservice/models/QnAMakerEndpointKeysResponse.java","src/main/java/com/azure/resourcemanager/botservice/models/RegenerateKeysChannelName.java","src/main/java/com/azure/resourcemanager/botservice/models/ResourceAssociation.java","src/main/java/com/azure/resourcemanager/botservice/models/SearchAssistant.java","src/main/java/com/azure/resourcemanager/botservice/models/ServiceProvider.java","src/main/java/com/azure/resourcemanager/botservice/models/ServiceProviderParameter.java","src/main/java/com/azure/resourcemanager/botservice/models/ServiceProviderParameterMetadata.java","src/main/java/com/azure/resourcemanager/botservice/models/ServiceProviderParameterMetadataConstraints.java","src/main/java/com/azure/resourcemanager/botservice/models/ServiceProviderProperties.java","src/main/java/com/azure/resourcemanager/botservice/models/ServiceProviderResponseList.java","src/main/java/com/azure/resourcemanager/botservice/models/Severity.java","src/main/java/com/azure/resourcemanager/botservice/models/Site.java","src/main/java/com/azure/resourcemanager/botservice/models/SiteInfo.java","src/main/java/com/azure/resourcemanager/botservice/models/Sku.java","src/main/java/com/azure/resourcemanager/botservice/models/SkuName.java","src/main/java/com/azure/resourcemanager/botservice/models/SkuTier.java","src/main/java/com/azure/resourcemanager/botservice/models/SkypeChannel.java","src/main/java/com/azure/resourcemanager/botservice/models/SkypeChannelProperties.java","src/main/java/com/azure/resourcemanager/botservice/models/SlackChannel.java","src/main/java/com/azure/resourcemanager/botservice/models/SlackChannelProperties.java","src/main/java/com/azure/resourcemanager/botservice/models/SmsChannel.java","src/main/java/com/azure/resourcemanager/botservice/models/SmsChannelProperties.java","src/main/java/com/azure/resourcemanager/botservice/models/TelegramChannel.java","src/main/java/com/azure/resourcemanager/botservice/models/TelegramChannelProperties.java","src/main/java/com/azure/resourcemanager/botservice/models/TelephonyChannel.java","src/main/java/com/azure/resourcemanager/botservice/models/TelephonyChannelProperties.java","src/main/java/com/azure/resourcemanager/botservice/models/TelephonyChannelResourceApiConfiguration.java","src/main/java/com/azure/resourcemanager/botservice/models/TelephonyPhoneNumbers.java","src/main/java/com/azure/resourcemanager/botservice/models/WebChatChannel.java","src/main/java/com/azure/resourcemanager/botservice/models/WebChatChannelProperties.java","src/main/java/com/azure/resourcemanager/botservice/models/WebChatSite.java","src/main/java/com/azure/resourcemanager/botservice/models/package-info.java","src/main/java/com/azure/resourcemanager/botservice/package-info.java","src/main/java/module-info.java"]} \ No newline at end of file diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-botservice/proxy-config.json b/sdk/botservice/azure-resourcemanager-botservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-botservice/proxy-config.json index 0fa8e12c917d..c22693d52a4b 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-botservice/proxy-config.json +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-botservice/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.botservice.implementation.BotConnectionsClientImpl$BotConnectionsService"],["com.azure.resourcemanager.botservice.implementation.BotsClientImpl$BotsService"],["com.azure.resourcemanager.botservice.implementation.ChannelsClientImpl$ChannelsService"],["com.azure.resourcemanager.botservice.implementation.DirectLinesClientImpl$DirectLinesService"],["com.azure.resourcemanager.botservice.implementation.HostSettingsClientImpl$HostSettingsService"],["com.azure.resourcemanager.botservice.implementation.OperationsClientImpl$OperationsService"]] \ No newline at end of file +[["com.azure.resourcemanager.botservice.implementation.BotConnectionsClientImpl$BotConnectionsService"],["com.azure.resourcemanager.botservice.implementation.BotsClientImpl$BotsService"],["com.azure.resourcemanager.botservice.implementation.ChannelsClientImpl$ChannelsService"],["com.azure.resourcemanager.botservice.implementation.DirectLinesClientImpl$DirectLinesService"],["com.azure.resourcemanager.botservice.implementation.EmailsClientImpl$EmailsService"],["com.azure.resourcemanager.botservice.implementation.HostSettingsClientImpl$HostSettingsService"],["com.azure.resourcemanager.botservice.implementation.NetworkSecurityPerimeterConfigurationsClientImpl$NetworkSecurityPerimeterConfigurationsService"],["com.azure.resourcemanager.botservice.implementation.OperationResultsClientImpl$OperationResultsService"],["com.azure.resourcemanager.botservice.implementation.OperationsClientImpl$OperationsService"],["com.azure.resourcemanager.botservice.implementation.PrivateEndpointConnectionsClientImpl$PrivateEndpointConnectionsService"],["com.azure.resourcemanager.botservice.implementation.PrivateLinkResourcesClientImpl$PrivateLinkResourcesService"],["com.azure.resourcemanager.botservice.implementation.QnAMakerEndpointKeysClientImpl$QnAMakerEndpointKeysService"]] \ No newline at end of file diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/main/resources/azure-resourcemanager-botservice.properties b/sdk/botservice/azure-resourcemanager-botservice/src/main/resources/azure-resourcemanager-botservice.properties new file mode 100644 index 000000000000..defbd48204e4 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/main/resources/azure-resourcemanager-botservice.properties @@ -0,0 +1 @@ +version=${project.version} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionCreateSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionCreateSamples.java index 1b3dd91a957d..522129cca264 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionCreateSamples.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -13,8 +13,7 @@ */ public final class BotConnectionCreateSamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/PutConnection.json + * x-ms-original-file: 2023-09-15-preview/PutConnection.json */ /** * Sample code: Create Connection Setting. @@ -24,8 +23,8 @@ public final class BotConnectionCreateSamples { public static void createConnectionSetting(com.azure.resourcemanager.botservice.BotServiceManager manager) { manager.botConnections() .define("sampleConnection") - .withRegion("West US") .withExistingBotService("OneResourceGroupName", "samplebotname") + .withRegion("West US") .withProperties( new ConnectionSettingProperties().withClientId("sampleclientid") .withClientSecret("fakeTokenPlaceholder") diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionDeleteSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionDeleteSamples.java index e1a528d745e7..e19013e55ced 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionDeleteSamples.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -9,8 +9,7 @@ */ public final class BotConnectionDeleteSamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/DeleteConnection.json + * x-ms-original-file: 2023-09-15-preview/DeleteConnection.json */ /** * Sample code: Delete Connection Setting. diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionGetSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionGetSamples.java index 329ad486dd6c..202a8a8ac431 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionGetSamples.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -9,8 +9,7 @@ */ public final class BotConnectionGetSamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/GetConnection.json + * x-ms-original-file: 2023-09-15-preview/GetConnection.json */ /** * Sample code: Get Connection Setting. diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionListByBotServiceSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionListByBotServiceSamples.java index bc426548c118..e588497abe03 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionListByBotServiceSamples.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionListByBotServiceSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -9,8 +9,7 @@ */ public final class BotConnectionListByBotServiceSamples { /* - * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/ - * ListConnectionsByBotService.json + * x-ms-original-file: 2023-09-15-preview/ListConnectionsByBotService.json */ /** * Sample code: List Connection Settings. diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionListServiceProvidersSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionListServiceProvidersSamples.java index 7f67aec29a87..f0a951badbb3 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionListServiceProvidersSamples.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionListServiceProvidersSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -9,9 +9,7 @@ */ public final class BotConnectionListServiceProvidersSamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/ListServiceProviders. - * json + * x-ms-original-file: 2023-09-15-preview/ListServiceProviders.json */ /** * Sample code: List Auth Service Providers. diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionListWithSecretsSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionListWithSecretsSamples.java index b9ed43b81e19..e4b51e2a82a5 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionListWithSecretsSamples.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionListWithSecretsSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -9,8 +9,7 @@ */ public final class BotConnectionListWithSecretsSamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/GetConnection.json + * x-ms-original-file: 2023-09-15-preview/GetConnectionListWithSecrets.json */ /** * Sample code: List Connection Setting With Secrets. diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionUpdateSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionUpdateSamples.java index 9c51d60a9532..d6cbf2a483dd 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionUpdateSamples.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotConnectionUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -14,8 +14,7 @@ */ public final class BotConnectionUpdateSamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/UpdateConnection.json + * x-ms-original-file: 2023-09-15-preview/UpdateConnection.json */ /** * Sample code: Update Connection Setting. @@ -29,7 +28,9 @@ public static void updateConnectionSetting(com.azure.resourcemanager.botservice. .getValue(); resource.update() .withProperties( - new ConnectionSettingProperties().withClientId("sampleclientid") + new ConnectionSettingProperties().withId("sampleId") + .withName("sampleName") + .withClientId("sampleclientid") .withClientSecret("fakeTokenPlaceholder") .withScopes("samplescope") .withServiceProviderId("serviceproviderid") diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsCreateSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsCreateSamples.java index e9494be936ba..d67972656022 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsCreateSamples.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsCreateSamples.java @@ -1,11 +1,12 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; import com.azure.resourcemanager.botservice.models.BotProperties; import com.azure.resourcemanager.botservice.models.Kind; +import com.azure.resourcemanager.botservice.models.MsaAppType; import com.azure.resourcemanager.botservice.models.PublicNetworkAccess; import com.azure.resourcemanager.botservice.models.Sku; import com.azure.resourcemanager.botservice.models.SkuName; @@ -18,8 +19,7 @@ */ public final class BotsCreateSamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/CreateBot.json + * x-ms-original-file: 2023-09-15-preview/CreateBot.json */ /** * Sample code: Create Bot. @@ -29,14 +29,18 @@ public final class BotsCreateSamples { public static void createBot(com.azure.resourcemanager.botservice.BotServiceManager manager) { manager.bots() .define("samplebotname") - .withRegion("West US") .withExistingResourceGroup("OneResourceGroupName") + .withRegion("West US") .withTags(mapOf("tag1", "value1", "tag2", "value2")) .withProperties(new BotProperties().withDisplayName("The Name of the bot") .withDescription("The description of the bot") .withIconUrl("http://myicon") .withEndpoint("http://mybot.coffee") + .withMsaAppType(MsaAppType.USER_ASSIGNED_MSI) .withMsaAppId("exampleappid") + .withMsaAppTenantId("exampleapptenantid") + .withMsaAppMSIResourceId( + "/subscriptions/foo/resourcegroups/bar/providers/microsoft.managedidentity/userassignedidentities/sampleId") .withDeveloperAppInsightKey("fakeTokenPlaceholder") .withDeveloperAppInsightsApiKey("fakeTokenPlaceholder") .withDeveloperAppInsightsApplicationId("appinsightsappid") @@ -45,6 +49,7 @@ public static void createBot(com.azure.resourcemanager.botservice.BotServiceMana .withIsCmekEnabled(true) .withCmekKeyVaultUrl("fakeTokenPlaceholder") .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) + .withDisableLocalAuth(true) .withSchemaTransformationVersion("1.0")) .withSku(new Sku().withName(SkuName.S1)) .withKind(Kind.SDK) diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsDeleteSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsDeleteSamples.java index a6e7351a81d1..7061501891fc 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsDeleteSamples.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -9,8 +9,7 @@ */ public final class BotsDeleteSamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/DeleteBot.json + * x-ms-original-file: 2023-09-15-preview/DeleteBot.json */ /** * Sample code: Delete Bot. diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsGetByResourceGroupSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsGetByResourceGroupSamples.java index 24c41ef93576..644832d283cc 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsGetByResourceGroupSamples.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsGetByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -9,8 +9,7 @@ */ public final class BotsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/GetBot.json + * x-ms-original-file: 2023-09-15-preview/GetBot.json */ /** * Sample code: Get Bot. diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsGetCheckNameAvailabilitySamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsGetCheckNameAvailabilitySamples.java index f9953b9365a3..7ef35dfea9f9 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsGetCheckNameAvailabilitySamples.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsGetCheckNameAvailabilitySamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -11,9 +11,7 @@ */ public final class BotsGetCheckNameAvailabilitySamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/CheckNameAvailability. - * json + * x-ms-original-file: 2023-09-15-preview/CheckNameAvailability.json */ /** * Sample code: check Name Availability. diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsListByResourceGroupSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsListByResourceGroupSamples.java index 62582fe1c3c4..5e0fc031ec73 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsListByResourceGroupSamples.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -9,9 +9,7 @@ */ public final class BotsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/ListBotsByResourceGroup - * .json + * x-ms-original-file: 2023-09-15-preview/ListBotsByResourceGroup.json */ /** * Sample code: List Bots by Resource Group. diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsListSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsListSamples.java index e7750d9a6a7d..4da928bbb9dc 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsListSamples.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -9,9 +9,7 @@ */ public final class BotsListSamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/ListBotsBySubscription. - * json + * x-ms-original-file: 2023-09-15-preview/ListBotsBySubscription.json */ /** * Sample code: List Bots by Subscription. diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsUpdateSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsUpdateSamples.java index e52a52e63c2c..106e6c39ef4a 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsUpdateSamples.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/BotsUpdateSamples.java @@ -1,12 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; import com.azure.resourcemanager.botservice.models.Bot; import com.azure.resourcemanager.botservice.models.BotProperties; import com.azure.resourcemanager.botservice.models.Kind; +import com.azure.resourcemanager.botservice.models.MsaAppType; import com.azure.resourcemanager.botservice.models.PublicNetworkAccess; import com.azure.resourcemanager.botservice.models.Sku; import com.azure.resourcemanager.botservice.models.SkuName; @@ -19,8 +20,7 @@ */ public final class BotsUpdateSamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/UpdateBot.json + * x-ms-original-file: 2023-09-15-preview/UpdateBot.json */ /** * Sample code: Update Bot. @@ -37,7 +37,11 @@ public static void updateBot(com.azure.resourcemanager.botservice.BotServiceMana .withDescription("The description of the bot") .withIconUrl("http://myicon") .withEndpoint("http://mybot.coffee") + .withMsaAppType(MsaAppType.USER_ASSIGNED_MSI) .withMsaAppId("msaappid") + .withMsaAppTenantId("msaapptenantid") + .withMsaAppMSIResourceId( + "/subscriptions/foo/resourcegroups/bar/providers/microsoft.managedidentity/userassignedidentities/sampleId") .withDeveloperAppInsightKey("fakeTokenPlaceholder") .withDeveloperAppInsightsApiKey("fakeTokenPlaceholder") .withDeveloperAppInsightsApplicationId("appinsightsappid") @@ -46,6 +50,7 @@ public static void updateBot(com.azure.resourcemanager.botservice.BotServiceMana .withIsCmekEnabled(true) .withCmekKeyVaultUrl("fakeTokenPlaceholder") .withPublicNetworkAccess(PublicNetworkAccess.ENABLED) + .withDisableLocalAuth(true) .withSchemaTransformationVersion("1.0")) .withSku(new Sku().withName(SkuName.S1)) .withKind(Kind.SDK) diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsCreateSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsCreateSamples.java index 314cb853ed86..8a338b896d74 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsCreateSamples.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsCreateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -23,8 +23,7 @@ */ public final class ChannelsCreateSamples { /* - * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/ - * PutDirectLineSpeechChannel.json + * x-ms-original-file: 2023-09-15-preview/PutDirectLineSpeechChannel.json */ /** * Sample code: Create DirectLine Speech Channel. @@ -34,17 +33,16 @@ public final class ChannelsCreateSamples { public static void createDirectLineSpeechChannel(com.azure.resourcemanager.botservice.BotServiceManager manager) { manager.channels() .createWithResponse("OneResourceGroupName", "samplebotname", ChannelName.DIRECT_LINE_SPEECH_CHANNEL, - new BotChannelInner().withLocation("global") - .withProperties(new DirectLineSpeechChannel().withProperties( - new DirectLineSpeechChannelProperties().withCognitiveServiceRegion("XcognitiveServiceRegionX") - .withCognitiveServiceSubscriptionKey("fakeTokenPlaceholder") - .withIsEnabled(true))), + new BotChannelInner().withProperties(new DirectLineSpeechChannel().withProperties( + new DirectLineSpeechChannelProperties().withCognitiveServiceRegion("XcognitiveServiceRegionX") + .withCognitiveServiceSubscriptionKey("fakeTokenPlaceholder") + .withIsEnabled(true))) + .withLocation("global"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/PutEmailChannel.json + * x-ms-original-file: 2023-09-15-preview/PutEmailChannel.json */ /** * Sample code: Create Email Channel. @@ -54,18 +52,17 @@ public static void createDirectLineSpeechChannel(com.azure.resourcemanager.botse public static void createEmailChannel(com.azure.resourcemanager.botservice.BotServiceManager manager) { manager.channels() .createWithResponse("OneResourceGroupName", "samplebotname", ChannelName.EMAIL_CHANNEL, - new BotChannelInner().withLocation("global") - .withProperties( - new EmailChannel().withProperties(new EmailChannelProperties().withEmailAddress("a@b.com") - .withAuthMethod(EmailChannelAuthMethod.ONE) - .withMagicCode("fakeTokenPlaceholder") - .withIsEnabled(true))), + new BotChannelInner().withProperties( + new EmailChannel().withProperties(new EmailChannelProperties().withEmailAddress("a@b.com") + .withAuthMethod(EmailChannelAuthMethod.GRAPH) + .withMagicCode("fakeTokenPlaceholder") + .withIsEnabled(true))) + .withLocation("global"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/PutAlexaChannel.json + * x-ms-original-file: 2023-09-15-preview/PutAlexaChannel.json */ /** * Sample code: Create Alexa Channel. @@ -75,15 +72,15 @@ public static void createEmailChannel(com.azure.resourcemanager.botservice.BotSe public static void createAlexaChannel(com.azure.resourcemanager.botservice.BotServiceManager manager) { manager.channels() .createWithResponse("OneResourceGroupName", "samplebotname", ChannelName.ALEXA_CHANNEL, - new BotChannelInner().withLocation("global") + new BotChannelInner() .withProperties(new AlexaChannel().withProperties( - new AlexaChannelProperties().withAlexaSkillId("XAlexaSkillIdX").withIsEnabled(true))), + new AlexaChannelProperties().withAlexaSkillId("XAlexaSkillIdX").withIsEnabled(true))) + .withLocation("global"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/PutChannel.json + * x-ms-original-file: 2023-09-15-preview/PutChannel.json */ /** * Sample code: Create Channel. @@ -93,17 +90,16 @@ public static void createAlexaChannel(com.azure.resourcemanager.botservice.BotSe public static void createChannel(com.azure.resourcemanager.botservice.BotServiceManager manager) { manager.channels() .createWithResponse("OneResourceGroupName", "samplebotname", ChannelName.EMAIL_CHANNEL, - new BotChannelInner().withLocation("global") - .withProperties( - new EmailChannel().withProperties(new EmailChannelProperties().withEmailAddress("a@b.com") - .withPassword("fakeTokenPlaceholder") - .withIsEnabled(true))), + new BotChannelInner().withProperties( + new EmailChannel().withProperties(new EmailChannelProperties().withEmailAddress("a@b.com") + .withPassword("fakeTokenPlaceholder") + .withIsEnabled(true))) + .withLocation("global"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/PutLineChannel.json + * x-ms-original-file: 2023-09-15-preview/PutLineChannel.json */ /** * Sample code: Create Line Channel. @@ -113,10 +109,11 @@ public static void createChannel(com.azure.resourcemanager.botservice.BotService public static void createLineChannel(com.azure.resourcemanager.botservice.BotServiceManager manager) { manager.channels() .createWithResponse("OneResourceGroupName", "samplebotname", ChannelName.LINE_CHANNEL, - new BotChannelInner().withLocation("global") + new BotChannelInner() .withProperties(new LineChannel().withProperties(new LineChannelProperties().withLineRegistrations( Arrays.asList(new LineRegistration().withChannelSecret("fakeTokenPlaceholder") - .withChannelAccessToken("fakeTokenPlaceholder"))))), + .withChannelAccessToken("fakeTokenPlaceholder"))))) + .withLocation("global"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsDeleteSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsDeleteSamples.java index 5de4a321d1c2..9c7136afe025 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsDeleteSamples.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsDeleteSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -9,8 +9,7 @@ */ public final class ChannelsDeleteSamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/DeleteChannel.json + * x-ms-original-file: 2023-09-15-preview/DeleteChannel.json */ /** * Sample code: Delete Channel. @@ -24,8 +23,7 @@ public static void deleteChannel(com.azure.resourcemanager.botservice.BotService } /* - * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/ - * DeleteDirectLineSpeechChannel.json + * x-ms-original-file: 2023-09-15-preview/DeleteDirectLineSpeechChannel.json */ /** * Sample code: Delete DirectLine Speech Channel. diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsGetSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsGetSamples.java index 466d0d0ff885..2226405ce85b 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsGetSamples.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -9,8 +9,7 @@ */ public final class ChannelsGetSamples { /* - * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/ - * GetDirectLineSpeechChannel.json + * x-ms-original-file: 2023-09-15-preview/GetDirectLineSpeechChannel.json */ /** * Sample code: Get DirectLine Speech Channel. @@ -24,8 +23,7 @@ public static void getDirectLineSpeechChannel(com.azure.resourcemanager.botservi } /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/GetAlexaChannel.json + * x-ms-original-file: 2023-09-15-preview/GetAlexaChannel.json */ /** * Sample code: Get Alexa Channel. @@ -38,8 +36,7 @@ public static void getAlexaChannel(com.azure.resourcemanager.botservice.BotServi } /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/GetLineChannel.json + * x-ms-original-file: 2023-09-15-preview/GetLineChannel.json */ /** * Sample code: Get Line Channel. @@ -52,8 +49,7 @@ public static void getLineChannel(com.azure.resourcemanager.botservice.BotServic } /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/GetChannel.json + * x-ms-original-file: 2023-09-15-preview/GetChannel.json */ /** * Sample code: Get Channel. diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsListByResourceGroupSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsListByResourceGroupSamples.java index c88072201867..9e9b190aed4b 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsListByResourceGroupSamples.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsListByResourceGroupSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -9,8 +9,7 @@ */ public final class ChannelsListByResourceGroupSamples { /* - * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/ - * ListChannelsByBotService.json + * x-ms-original-file: 2023-09-15-preview/ListChannelsByBotService.json */ /** * Sample code: List Channels by Resource Group. diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsListWithKeysSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsListWithKeysSamples.java index 8cbc49e583b5..210e01bab213 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsListWithKeysSamples.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsListWithKeysSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -11,8 +11,7 @@ */ public final class ChannelsListWithKeysSamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/ListChannel.json + * x-ms-original-file: 2023-09-15-preview/ListChannel.json */ /** * Sample code: List Channel. diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsUpdateSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsUpdateSamples.java index 46583603f883..f8ab861c968b 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsUpdateSamples.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/ChannelsUpdateSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -22,8 +22,7 @@ */ public final class ChannelsUpdateSamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/UpdateAlexaChannel.json + * x-ms-original-file: 2023-09-15-preview/UpdateAlexaChannel.json */ /** * Sample code: Update Alexa Channel. @@ -33,15 +32,15 @@ public final class ChannelsUpdateSamples { public static void updateAlexaChannel(com.azure.resourcemanager.botservice.BotServiceManager manager) { manager.channels() .updateWithResponse("OneResourceGroupName", "samplebotname", ChannelName.ALEXA_CHANNEL, - new BotChannelInner().withLocation("global") + new BotChannelInner() .withProperties(new AlexaChannel().withProperties( - new AlexaChannelProperties().withAlexaSkillId("XAlexaSkillIdX").withIsEnabled(true))), + new AlexaChannelProperties().withAlexaSkillId("XAlexaSkillIdX").withIsEnabled(true))) + .withLocation("global"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/ - * UpdateDirectLineSpeechChannel.json + * x-ms-original-file: 2023-09-15-preview/UpdateDirectLineSpeechChannel.json */ /** * Sample code: Update DirectLine Speech Channel. @@ -51,17 +50,16 @@ public static void updateAlexaChannel(com.azure.resourcemanager.botservice.BotSe public static void updateDirectLineSpeechChannel(com.azure.resourcemanager.botservice.BotServiceManager manager) { manager.channels() .updateWithResponse("OneResourceGroupName", "samplebotname", ChannelName.DIRECT_LINE_SPEECH_CHANNEL, - new BotChannelInner().withLocation("global") - .withProperties(new DirectLineSpeechChannel().withProperties( - new DirectLineSpeechChannelProperties().withCognitiveServiceRegion("XcognitiveServiceRegionX") - .withCognitiveServiceSubscriptionKey("fakeTokenPlaceholder") - .withIsEnabled(true))), + new BotChannelInner().withProperties(new DirectLineSpeechChannel().withProperties( + new DirectLineSpeechChannelProperties().withCognitiveServiceRegion("XcognitiveServiceRegionX") + .withCognitiveServiceSubscriptionKey("fakeTokenPlaceholder") + .withIsEnabled(true))) + .withLocation("global"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/UpdateLineChannel.json + * x-ms-original-file: 2023-09-15-preview/UpdateLineChannel.json */ /** * Sample code: Update Line Channel. @@ -71,16 +69,16 @@ public static void updateDirectLineSpeechChannel(com.azure.resourcemanager.botse public static void updateLineChannel(com.azure.resourcemanager.botservice.BotServiceManager manager) { manager.channels() .updateWithResponse("OneResourceGroupName", "samplebotname", ChannelName.LINE_CHANNEL, - new BotChannelInner().withLocation("global") + new BotChannelInner() .withProperties(new LineChannel().withProperties(new LineChannelProperties().withLineRegistrations( Arrays.asList(new LineRegistration().withChannelSecret("fakeTokenPlaceholder") - .withChannelAccessToken("fakeTokenPlaceholder"))))), + .withChannelAccessToken("fakeTokenPlaceholder"))))) + .withLocation("global"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/UpdateChannel.json + * x-ms-original-file: 2023-09-15-preview/UpdateChannel.json */ /** * Sample code: Update Channel. @@ -90,11 +88,11 @@ public static void updateLineChannel(com.azure.resourcemanager.botservice.BotSer public static void updateChannel(com.azure.resourcemanager.botservice.BotServiceManager manager) { manager.channels() .updateWithResponse("OneResourceGroupName", "samplebotname", ChannelName.EMAIL_CHANNEL, - new BotChannelInner().withLocation("global") - .withProperties( - new EmailChannel().withProperties(new EmailChannelProperties().withEmailAddress("a@b.com") - .withPassword("fakeTokenPlaceholder") - .withIsEnabled(true))), + new BotChannelInner().withProperties( + new EmailChannel().withProperties(new EmailChannelProperties().withEmailAddress("a@b.com") + .withPassword("fakeTokenPlaceholder") + .withIsEnabled(true))) + .withLocation("global"), com.azure.core.util.Context.NONE); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/DirectLineRegenerateKeysSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/DirectLineRegenerateKeysSamples.java index f73b4417e4b7..3a550f2aa631 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/DirectLineRegenerateKeysSamples.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/DirectLineRegenerateKeysSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -13,8 +13,7 @@ */ public final class DirectLineRegenerateKeysSamples { /* - * x-ms-original-file: specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/ - * DirectlineRegenerateKeys.json + * x-ms-original-file: 2023-09-15-preview/DirectlineRegenerateKeys.json */ /** * Sample code: Regenerate Keys for DirectLine Channel Site. @@ -30,9 +29,7 @@ public final class DirectLineRegenerateKeysSamples { } /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/WebChatRegenerateKeys. - * json + * x-ms-original-file: 2023-09-15-preview/WebChatRegenerateKeys.json */ /** * Sample code: Regenerate Keys for WebChat Channel Site. diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/EmailCreateSignInUrlSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/EmailCreateSignInUrlSamples.java new file mode 100644 index 000000000000..402abda446e9 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/EmailCreateSignInUrlSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +/** + * Samples for Email CreateSignInUrl. + */ +public final class EmailCreateSignInUrlSamples { + /* + * x-ms-original-file: 2023-09-15-preview/CreateEmailSignInUrl.json + */ + /** + * Sample code: Create Url. + * + * @param manager Entry point to BotServiceManager. + */ + public static void createUrl(com.azure.resourcemanager.botservice.BotServiceManager manager) { + manager.emails() + .createSignInUrlWithResponse("OneResourceGroupName", "samplebotname", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/HostSettingsGetSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/HostSettingsGetSamples.java index 1ecdc4f189df..c094494f53e0 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/HostSettingsGetSamples.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/HostSettingsGetSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -9,8 +9,7 @@ */ public final class HostSettingsGetSamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/GetHostSettings.json + * x-ms-original-file: 2023-09-15-preview/GetHostSettings.json */ /** * Sample code: Get Bot Host Settings. diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationsGetSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationsGetSamples.java new file mode 100644 index 000000000000..2a2f01a54546 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationsGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +/** + * Samples for NetworkSecurityPerimeterConfigurations Get. + */ +public final class NetworkSecurityPerimeterConfigurationsGetSamples { + /* + * x-ms-original-file: 2023-09-15-preview/GetNetworkSecurityPerimeterConfiguration.json + */ + /** + * Sample code: Get Network Security Perimeter Configuration. + * + * @param manager Entry point to BotServiceManager. + */ + public static void + getNetworkSecurityPerimeterConfiguration(com.azure.resourcemanager.botservice.BotServiceManager manager) { + manager.networkSecurityPerimeterConfigurations() + .getWithResponse("rgName", "botId", "00000000-0000-0000-0000-000000000000.associationName", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationsListSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationsListSamples.java new file mode 100644 index 000000000000..68e87ba99d1a --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +/** + * Samples for NetworkSecurityPerimeterConfigurations List. + */ +public final class NetworkSecurityPerimeterConfigurationsListSamples { + /* + * x-ms-original-file: 2023-09-15-preview/ListNetworkSecurityPerimeterConfigurations.json + */ + /** + * Sample code: List Network Security Perimeter Configurations. + * + * @param manager Entry point to BotServiceManager. + */ + public static void + listNetworkSecurityPerimeterConfigurations(com.azure.resourcemanager.botservice.BotServiceManager manager) { + manager.networkSecurityPerimeterConfigurations().list("rgName", "botId", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationsReconcileSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationsReconcileSamples.java new file mode 100644 index 000000000000..17f35efcc9d1 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationsReconcileSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +/** + * Samples for NetworkSecurityPerimeterConfigurations Reconcile. + */ +public final class NetworkSecurityPerimeterConfigurationsReconcileSamples { + /* + * x-ms-original-file: 2023-09-15-preview/ReconcileNetworkSecurityPerimeterConfiguration.json + */ + /** + * Sample code: Reconcile Network Security Perimeter Configuration. + * + * @param manager Entry point to BotServiceManager. + */ + public static void + reconcileNetworkSecurityPerimeterConfiguration(com.azure.resourcemanager.botservice.BotServiceManager manager) { + manager.networkSecurityPerimeterConfigurations() + .reconcile("rgName", "botId", "00000000-0000-0000-0000-000000000000.associationName", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/OperationResultsGetSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/OperationResultsGetSamples.java new file mode 100644 index 000000000000..303ae95c038a --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/OperationResultsGetSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +/** + * Samples for OperationResults Get. + */ +public final class OperationResultsGetSamples { + /* + * x-ms-original-file: 2023-09-15-preview/OperationResultsGet.json + */ + /** + * Sample code: Get operation result. + * + * @param manager Entry point to BotServiceManager. + */ + public static void getOperationResult(com.azure.resourcemanager.botservice.BotServiceManager manager) { + manager.operationResults().get("exampleid", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/OperationsListSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/OperationsListSamples.java index ffc9ff64b674..b956c06bb012 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/OperationsListSamples.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/OperationsListSamples.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -9,8 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/botservice/resource-manager/Microsoft.BotService/stable/2021-03-01/examples/GetOperations.json + * x-ms-original-file: 2023-09-15-preview/GetOperations.json */ /** * Sample code: Get Operations. diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsCreateSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsCreateSamples.java new file mode 100644 index 000000000000..dedcd230f13a --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsCreateSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +import com.azure.resourcemanager.botservice.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.botservice.models.PrivateLinkServiceConnectionState; + +/** + * Samples for PrivateEndpointConnections Create. + */ +public final class PrivateEndpointConnectionsCreateSamples { + /* + * x-ms-original-file: 2023-09-15-preview/PutPrivateEndpointConnection.json + */ + /** + * Sample code: Put Private Endpoint Connection. + * + * @param manager Entry point to BotServiceManager. + */ + public static void putPrivateEndpointConnection(com.azure.resourcemanager.botservice.BotServiceManager manager) { + manager.privateEndpointConnections() + .define("{privateEndpointConnectionName}") + .withExistingBotService("res7687", "sto9699") + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) + .withDescription("Auto-Approved")) + .create(); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsDeleteSamples.java new file mode 100644 index 000000000000..5177288dcbf6 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +/** + * Samples for PrivateEndpointConnections Delete. + */ +public final class PrivateEndpointConnectionsDeleteSamples { + /* + * x-ms-original-file: 2023-09-15-preview/DeletePrivateEndpointConnection.json + */ + /** + * Sample code: Delete Private Endpoint Connection. + * + * @param manager Entry point to BotServiceManager. + */ + public static void deletePrivateEndpointConnection(com.azure.resourcemanager.botservice.BotServiceManager manager) { + manager.privateEndpointConnections() + .deleteWithResponse("res6977", "sto2527", "{privateEndpointConnectionName}", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsGetSamples.java new file mode 100644 index 000000000000..1277adeb6bb4 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +/** + * Samples for PrivateEndpointConnections Get. + */ +public final class PrivateEndpointConnectionsGetSamples { + /* + * x-ms-original-file: 2023-09-15-preview/GetPrivateEndpointConnection.json + */ + /** + * Sample code: Get Private Endpoint Connection. + * + * @param manager Entry point to BotServiceManager. + */ + public static void getPrivateEndpointConnection(com.azure.resourcemanager.botservice.BotServiceManager manager) { + manager.privateEndpointConnections() + .getWithResponse("res6977", "sto2527", "{privateEndpointConnectionName}", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsListSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsListSamples.java new file mode 100644 index 000000000000..9d6149f0b284 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +/** + * Samples for PrivateEndpointConnections List. + */ +public final class PrivateEndpointConnectionsListSamples { + /* + * x-ms-original-file: 2023-09-15-preview/ListPrivateEndpointConnections.json + */ + /** + * Sample code: List Private Endpoint Connections. + * + * @param manager Entry point to BotServiceManager. + */ + public static void listPrivateEndpointConnections(com.azure.resourcemanager.botservice.BotServiceManager manager) { + manager.privateEndpointConnections().list("res6977", "sto2527", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateLinkResourcesListByBotResourceSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateLinkResourcesListByBotResourceSamples.java new file mode 100644 index 000000000000..07aa0dfc9fef --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/PrivateLinkResourcesListByBotResourceSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +/** + * Samples for PrivateLinkResources ListByBotResource. + */ +public final class PrivateLinkResourcesListByBotResourceSamples { + /* + * x-ms-original-file: 2023-09-15-preview/ListPrivateLinkResources.json + */ + /** + * Sample code: List Private Link Resources. + * + * @param manager Entry point to BotServiceManager. + */ + public static void listPrivateLinkResources(com.azure.resourcemanager.botservice.BotServiceManager manager) { + manager.privateLinkResources() + .listByBotResourceWithResponse("res6977", "sto2527", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/QnAMakerEndpointKeysGetSamples.java b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/QnAMakerEndpointKeysGetSamples.java new file mode 100644 index 000000000000..1ad08dee11ed --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/samples/java/com/azure/resourcemanager/botservice/generated/QnAMakerEndpointKeysGetSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +import com.azure.resourcemanager.botservice.models.QnAMakerEndpointKeysRequestBody; + +/** + * Samples for QnAMakerEndpointKeys Get. + */ +public final class QnAMakerEndpointKeysGetSamples { + /* + * x-ms-original-file: 2023-09-15-preview/ListQnAMakerEndpointKeys.json + */ + /** + * Sample code: List QnAMaker Endpoint Keys. + * + * @param manager Entry point to BotServiceManager. + */ + public static void listQnAMakerEndpointKeys(com.azure.resourcemanager.botservice.BotServiceManager manager) { + manager.qnAMakerEndpointKeys() + .getWithResponse( + new QnAMakerEndpointKeysRequestBody().withHostname("https://xxx.cognitiveservices.azure.com/") + .withAuthkey("fakeTokenPlaceholder"), + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/AcsChatChannelTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/AcsChatChannelTests.java index ae46f24d1e86..60c5abe4393d 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/AcsChatChannelTests.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/AcsChatChannelTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -12,17 +12,17 @@ public final class AcsChatChannelTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AcsChatChannel model = BinaryData.fromString( - "{\"channelName\":\"AcsChatChannel\",\"etag\":\"qytjrybnwjewgd\",\"provisioningState\":\"ervnaenqpehi\",\"location\":\"oygmift\"}") + "{\"channelName\":\"AcsChatChannel\",\"etag\":\"tlmngu\",\"provisioningState\":\"wqaldsyu\",\"location\":\"imerqfobwyznk\"}") .toObject(AcsChatChannel.class); - Assertions.assertEquals("qytjrybnwjewgd", model.etag()); - Assertions.assertEquals("oygmift", model.location()); + Assertions.assertEquals("tlmngu", model.etag()); + Assertions.assertEquals("imerqfobwyznk", model.location()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AcsChatChannel model = new AcsChatChannel().withEtag("qytjrybnwjewgd").withLocation("oygmift"); + AcsChatChannel model = new AcsChatChannel().withEtag("tlmngu").withLocation("imerqfobwyznk"); model = BinaryData.fromObject(model).toObject(AcsChatChannel.class); - Assertions.assertEquals("qytjrybnwjewgd", model.etag()); - Assertions.assertEquals("oygmift", model.location()); + Assertions.assertEquals("tlmngu", model.etag()); + Assertions.assertEquals("imerqfobwyznk", model.location()); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/AlexaChannelPropertiesTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/AlexaChannelPropertiesTests.java index e167d40e2fb9..15ca5a532ec0 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/AlexaChannelPropertiesTests.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/AlexaChannelPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -12,18 +12,17 @@ public final class AlexaChannelPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AlexaChannelProperties model = BinaryData.fromString( - "{\"alexaSkillId\":\"azqugxywpmueefj\",\"urlFragment\":\"fqkquj\",\"serviceEndpointUri\":\"suyonobglaocq\",\"isEnabled\":false}") + "{\"alexaSkillId\":\"zynkedya\",\"urlFragment\":\"wyhqmibzyhwits\",\"serviceEndpointUri\":\"pyy\",\"isEnabled\":false}") .toObject(AlexaChannelProperties.class); - Assertions.assertEquals("azqugxywpmueefj", model.alexaSkillId()); - Assertions.assertEquals(false, model.isEnabled()); + Assertions.assertEquals("zynkedya", model.alexaSkillId()); + Assertions.assertFalse(model.isEnabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AlexaChannelProperties model - = new AlexaChannelProperties().withAlexaSkillId("azqugxywpmueefj").withIsEnabled(false); + AlexaChannelProperties model = new AlexaChannelProperties().withAlexaSkillId("zynkedya").withIsEnabled(false); model = BinaryData.fromObject(model).toObject(AlexaChannelProperties.class); - Assertions.assertEquals("azqugxywpmueefj", model.alexaSkillId()); - Assertions.assertEquals(false, model.isEnabled()); + Assertions.assertEquals("zynkedya", model.alexaSkillId()); + Assertions.assertFalse(model.isEnabled()); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/AlexaChannelTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/AlexaChannelTests.java index 3f0aebf309cf..3f1e22de72f9 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/AlexaChannelTests.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/AlexaChannelTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -13,23 +13,23 @@ public final class AlexaChannelTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AlexaChannel model = BinaryData.fromString( - "{\"channelName\":\"AlexaChannel\",\"properties\":{\"alexaSkillId\":\"ceoveilovno\",\"urlFragment\":\"fj\",\"serviceEndpointUri\":\"njbkcnxdhbttkph\",\"isEnabled\":false},\"etag\":\"nv\",\"provisioningState\":\"oqnermclfpl\",\"location\":\"oxuscrpabgyepsbj\"}") + "{\"channelName\":\"AlexaChannel\",\"properties\":{\"alexaSkillId\":\"qkvpuvksgplsakn\",\"urlFragment\":\"fsynljphuop\",\"serviceEndpointUri\":\"dlqiyntorzih\",\"isEnabled\":false},\"etag\":\"sjswsrms\",\"provisioningState\":\"zrpzb\",\"location\":\"ckqqzqioxiysui\"}") .toObject(AlexaChannel.class); - Assertions.assertEquals("nv", model.etag()); - Assertions.assertEquals("oxuscrpabgyepsbj", model.location()); - Assertions.assertEquals("ceoveilovno", model.properties().alexaSkillId()); - Assertions.assertEquals(false, model.properties().isEnabled()); + Assertions.assertEquals("sjswsrms", model.etag()); + Assertions.assertEquals("ckqqzqioxiysui", model.location()); + Assertions.assertEquals("qkvpuvksgplsakn", model.properties().alexaSkillId()); + Assertions.assertFalse(model.properties().isEnabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AlexaChannel model = new AlexaChannel().withEtag("nv") - .withLocation("oxuscrpabgyepsbj") - .withProperties(new AlexaChannelProperties().withAlexaSkillId("ceoveilovno").withIsEnabled(false)); + AlexaChannel model = new AlexaChannel().withEtag("sjswsrms") + .withLocation("ckqqzqioxiysui") + .withProperties(new AlexaChannelProperties().withAlexaSkillId("qkvpuvksgplsakn").withIsEnabled(false)); model = BinaryData.fromObject(model).toObject(AlexaChannel.class); - Assertions.assertEquals("nv", model.etag()); - Assertions.assertEquals("oxuscrpabgyepsbj", model.location()); - Assertions.assertEquals("ceoveilovno", model.properties().alexaSkillId()); - Assertions.assertEquals(false, model.properties().isEnabled()); + Assertions.assertEquals("sjswsrms", model.etag()); + Assertions.assertEquals("ckqqzqioxiysui", model.location()); + Assertions.assertEquals("qkvpuvksgplsakn", model.properties().alexaSkillId()); + Assertions.assertFalse(model.properties().isEnabled()); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/BotChannelInnerTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/BotChannelInnerTests.java index 68da4afe2d2a..d628df1e2ab4 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/BotChannelInnerTests.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/BotChannelInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -18,34 +18,34 @@ public final class BotChannelInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { BotChannelInner model = BinaryData.fromString( - "{\"properties\":{\"channelName\":\"Channel\",\"etag\":\"zrnf\",\"provisioningState\":\"xgispemvtzfkufu\",\"location\":\"jofxqe\"},\"sku\":{\"name\":\"F0\",\"tier\":\"Free\"},\"kind\":\"azurebot\",\"etag\":\"qjbasvms\",\"zones\":[\"ulngsntn\",\"ybkzgcwr\",\"clxxwrljdo\",\"skcqvkocrcjd\"],\"location\":\"wtnhxbnjbiksqr\",\"tags\":{\"jfm\":\"sainqpjwnzl\",\"vmgxsab\":\"pee\",\"jczdzevndh\":\"yqduujit\",\"feusnhut\":\"rwpdappdsbdkvwrw\"},\"id\":\"eltmrldhugjzzdat\",\"name\":\"xhocdgeablgphuti\",\"type\":\"ndv\"}") + "{\"properties\":{\"channelName\":\"Channel\",\"etag\":\"mhrkwofyyvoqacp\",\"provisioningState\":\"xpbtgiwbwo\",\"location\":\"washr\"},\"location\":\"tkcnqxwb\",\"tags\":{\"aasipqi\":\"ulpiuj\",\"erpqlpqwcciuqg\":\"obyu\",\"hykojoxafnndlpic\":\"dbutauvfbtkuwhh\"},\"sku\":{\"name\":\"F0\",\"tier\":\"Standard\"},\"kind\":\"sdk\",\"etag\":\"yhbpkkpw\",\"zones\":[\"q\",\"ovvqfovljxywsu\",\"syrsndsytgadgvra\"],\"id\":\"en\",\"name\":\"qnzarrwl\",\"type\":\"uu\"}") .toObject(BotChannelInner.class); - Assertions.assertEquals("wtnhxbnjbiksqr", model.location()); - Assertions.assertEquals("sainqpjwnzl", model.tags().get("jfm")); - Assertions.assertEquals("zrnf", model.properties().etag()); - Assertions.assertEquals("jofxqe", model.properties().location()); + Assertions.assertEquals("mhrkwofyyvoqacp", model.properties().etag()); + Assertions.assertEquals("washr", model.properties().location()); + Assertions.assertEquals("tkcnqxwb", model.location()); + Assertions.assertEquals("ulpiuj", model.tags().get("aasipqi")); Assertions.assertEquals(SkuName.F0, model.sku().name()); - Assertions.assertEquals(Kind.AZUREBOT, model.kind()); - Assertions.assertEquals("qjbasvms", model.etag()); + Assertions.assertEquals(Kind.SDK, model.kind()); + Assertions.assertEquals("yhbpkkpw", model.etag()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - BotChannelInner model = new BotChannelInner().withLocation("wtnhxbnjbiksqr") - .withTags( - mapOf("jfm", "sainqpjwnzl", "vmgxsab", "pee", "jczdzevndh", "yqduujit", "feusnhut", "rwpdappdsbdkvwrw")) - .withProperties(new Channel().withEtag("zrnf").withLocation("jofxqe")) - .withSku(new Sku().withName(SkuName.F0)) - .withKind(Kind.AZUREBOT) - .withEtag("qjbasvms"); + BotChannelInner model + = new BotChannelInner().withProperties(new Channel().withEtag("mhrkwofyyvoqacp").withLocation("washr")) + .withLocation("tkcnqxwb") + .withTags(mapOf("aasipqi", "ulpiuj", "erpqlpqwcciuqg", "obyu", "hykojoxafnndlpic", "dbutauvfbtkuwhh")) + .withSku(new Sku().withName(SkuName.F0)) + .withKind(Kind.SDK) + .withEtag("yhbpkkpw"); model = BinaryData.fromObject(model).toObject(BotChannelInner.class); - Assertions.assertEquals("wtnhxbnjbiksqr", model.location()); - Assertions.assertEquals("sainqpjwnzl", model.tags().get("jfm")); - Assertions.assertEquals("zrnf", model.properties().etag()); - Assertions.assertEquals("jofxqe", model.properties().location()); + Assertions.assertEquals("mhrkwofyyvoqacp", model.properties().etag()); + Assertions.assertEquals("washr", model.properties().location()); + Assertions.assertEquals("tkcnqxwb", model.location()); + Assertions.assertEquals("ulpiuj", model.tags().get("aasipqi")); Assertions.assertEquals(SkuName.F0, model.sku().name()); - Assertions.assertEquals(Kind.AZUREBOT, model.kind()); - Assertions.assertEquals("qjbasvms", model.etag()); + Assertions.assertEquals(Kind.SDK, model.kind()); + Assertions.assertEquals("yhbpkkpw", model.etag()); } // Use "Map.of" if available diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/BotConnectionsDeleteWithResponseMockTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/BotConnectionsDeleteWithResponseMockTests.java index e4b7f11c9a95..dbbea0bc4b5e 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/BotConnectionsDeleteWithResponseMockTests.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/BotConnectionsDeleteWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.botservice.BotServiceManager; import java.nio.charset.StandardCharsets; @@ -25,10 +25,9 @@ public void testDeleteWithResponse() throws Exception { BotServiceManager manager = BotServiceManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.botConnections() - .deleteWithResponse("frl", "zszrnwoiindfpw", "jylwbtlhflsj", com.azure.core.util.Context.NONE); + manager.botConnections().deleteWithResponse("mkdasv", "lyhb", "cu", com.azure.core.util.Context.NONE); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/BotConnectionsListServiceProvidersWithResponseMockTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/BotConnectionsListServiceProvidersWithResponseMockTests.java index 756931b95970..eca28d8b65b2 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/BotConnectionsListServiceProvidersWithResponseMockTests.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/BotConnectionsListServiceProvidersWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.botservice.BotServiceManager; import com.azure.resourcemanager.botservice.models.ServiceProviderResponseList; @@ -21,18 +21,18 @@ public final class BotConnectionsListServiceProvidersWithResponseMockTests { @Test public void testListServiceProvidersWithResponse() throws Exception { String responseStr - = "{\"nextLink\":\"izsjqlhkrr\",\"value\":[{\"properties\":{\"id\":\"b\",\"displayName\":\"p\",\"serviceProviderName\":\"ghvxndzwmkrefa\",\"devPortalUrl\":\"jorwkqnyhgbij\",\"iconUrl\":\"ivfxzsjabibsyst\",\"parameters\":[{},{},{}]}},{\"properties\":{\"id\":\"jpvkvpbjxbkzbzkd\",\"displayName\":\"cjabudurgkakmo\",\"serviceProviderName\":\"hjjklff\",\"devPortalUrl\":\"ouw\",\"iconUrl\":\"gzrf\",\"parameters\":[{},{},{},{}]}}]}"; + = "{\"nextLink\":\"qspkcdqzhlctd\",\"value\":[{\"properties\":{\"id\":\"dyfpchrqbnj\",\"displayName\":\"cgegydcwbo\",\"serviceProviderName\":\"umvq\",\"devPortalUrl\":\"lihrraiouaubr\",\"iconUrl\":\"loqxfuojrngif\",\"parameters\":[{}]}},{\"properties\":{\"id\":\"sccbiuimzd\",\"displayName\":\"jdfqwmkyoqufdvr\",\"serviceProviderName\":\"slzojh\",\"devPortalUrl\":\"tfnmdx\",\"iconUrl\":\"ngfdgugeyzihgrky\",\"parameters\":[{}]}},{\"properties\":{\"id\":\"snmfpphojeevy\",\"displayName\":\"hsgz\",\"serviceProviderName\":\"zbgomfgbeg\",\"devPortalUrl\":\"gleohi\",\"iconUrl\":\"tnluankrr\",\"parameters\":[{},{},{}]}},{\"properties\":{\"id\":\"btijvacvbm\",\"displayName\":\"bqqxlaj\",\"serviceProviderName\":\"wxacevehj\",\"devPortalUrl\":\"yxoaf\",\"iconUrl\":\"oqltfae\",\"parameters\":[{},{},{}]}}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); BotServiceManager manager = BotServiceManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); ServiceProviderResponseList response = manager.botConnections().listServiceProvidersWithResponse(com.azure.core.util.Context.NONE).getValue(); - Assertions.assertEquals("izsjqlhkrr", response.nextLink()); + Assertions.assertEquals("qspkcdqzhlctd", response.nextLink()); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/BotsDeleteByResourceGroupWithResponseMockTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/BotsDeleteByResourceGroupWithResponseMockTests.java index 46e359423d15..8726f10434fb 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/BotsDeleteByResourceGroupWithResponseMockTests.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/BotsDeleteByResourceGroupWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.botservice.BotServiceManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testDeleteWithResponse() throws Exception { BotServiceManager manager = BotServiceManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.bots().deleteByResourceGroupWithResponse("lzpswiydm", "wyhzdx", com.azure.core.util.Context.NONE); + manager.bots().deleteByResourceGroupWithResponse("hxumwctondzj", "uu", com.azure.core.util.Context.NONE); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ChannelResponseListTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ChannelResponseListTests.java index 17dd94289d9d..3f6a2a762e59 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ChannelResponseListTests.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ChannelResponseListTests.java @@ -1,26 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.botservice.models.ChannelResponseList; +import com.azure.resourcemanager.botservice.implementation.models.ChannelResponseList; import org.junit.jupiter.api.Assertions; public final class ChannelResponseListTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ChannelResponseList model = BinaryData.fromString( - "{\"nextLink\":\"utduqktapspwgcu\",\"value\":[{\"properties\":{\"channelName\":\"Channel\",\"etag\":\"kdosvqw\",\"provisioningState\":\"mdgbbjfdd\",\"location\":\"bmbexppbhtqqro\"},\"sku\":{\"name\":\"F0\",\"tier\":\"Standard\"},\"kind\":\"azurebot\",\"etag\":\"gbquxigj\",\"zones\":[\"zjaoyfhrtxil\",\"erkujys\",\"l\",\"juvf\"],\"location\":\"awrlyx\",\"tags\":{\"nwbxgjvtbvpyssz\":\"cpr\",\"guhmuouqfpr\":\"nruj\"},\"id\":\"zw\",\"name\":\"nguitnwuizgazxu\",\"type\":\"izuckyfihrfidfvz\"},{\"properties\":{\"channelName\":\"Channel\",\"etag\":\"uht\",\"provisioningState\":\"wisdkft\",\"location\":\"xmnteiwaop\"},\"sku\":{\"name\":\"S1\",\"tier\":\"Standard\"},\"kind\":\"function\",\"etag\":\"xdcu\",\"zones\":[\"srp\",\"mzidnsezcxtb\",\"sgfyccsnew\"],\"location\":\"dwzjeiach\",\"tags\":{\"eeh\":\"sflnrosfqp\",\"swjdkirso\":\"zvypyqrimzinp\"},\"id\":\"dqxhcrmnohjtckwh\",\"name\":\"soifiyipjxsqw\",\"type\":\"gr\"},{\"properties\":{\"channelName\":\"Channel\",\"etag\":\"norcjxvsnbyxqab\",\"provisioningState\":\"ocpcy\",\"location\":\"urzafb\"},\"sku\":{\"name\":\"F0\",\"tier\":\"Standard\"},\"kind\":\"designer\",\"etag\":\"qcjm\",\"zones\":[\"a\",\"bqidtqaj\",\"yulpkudjkr\"],\"location\":\"khbzhfepgzg\",\"tags\":{\"scpai\":\"zloc\",\"l\":\"rhhbcs\",\"bnbdxkqpxokajion\":\"mmajtjaodx\"},\"id\":\"imexgstxgcpodgma\",\"name\":\"jrmvdjwzrlo\",\"type\":\"mcl\"},{\"properties\":{\"channelName\":\"Channel\",\"etag\":\"j\",\"provisioningState\":\"ejctbzaqsqsycb\",\"location\":\"fkgukdkexxppof\"},\"sku\":{\"name\":\"S1\",\"tier\":\"Free\"},\"kind\":\"azurebot\",\"etag\":\"gddtocj\",\"zones\":[\"vpmouexhdzxib\",\"eojnxqbzvddn\"],\"location\":\"wndeicbtwnp\",\"tags\":{\"t\":\"qvuhrhcffcyddglm\",\"qciwqvhkhixuigdt\":\"jqkwpyeicx\"},\"id\":\"pbobjo\",\"name\":\"hm\",\"type\":\"w\"}]}") + "{\"value\":[{\"properties\":{\"channelName\":\"Channel\",\"etag\":\"akufgmjz\",\"provisioningState\":\"rdgrtw\",\"location\":\"nuuzkopbm\"},\"location\":\"rfdwoyu\",\"tags\":{\"mzqhoftrmaequi\":\"iuiefozbhdmsm\",\"iyylhalnswhccsp\":\"hxicslfaoqz\",\"scywuggwoluhc\":\"kaivwit\"},\"sku\":{\"name\":\"F0\",\"tier\":\"Standard\"},\"kind\":\"function\",\"etag\":\"rsbrgzdwm\",\"zones\":[\"ypqwdxggiccc\",\"xqhuexm\",\"ttlstvlzywemhz\",\"ncsdtclusiyp\"],\"id\":\"fgytguslfeadcyg\",\"name\":\"ukyhejhzis\",\"type\":\"gfpelolppvksrpqv\"}],\"nextLink\":\"zraehtwd\"}") .toObject(ChannelResponseList.class); - Assertions.assertEquals("utduqktapspwgcu", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ChannelResponseList model = new ChannelResponseList().withNextLink("utduqktapspwgcu"); - model = BinaryData.fromObject(model).toObject(ChannelResponseList.class); - Assertions.assertEquals("utduqktapspwgcu", model.nextLink()); + Assertions.assertEquals("zraehtwd", model.nextLink()); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ChannelTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ChannelTests.java index 1906a2c64f06..3cdc2b74d9d2 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ChannelTests.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ChannelTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -12,17 +12,17 @@ public final class ChannelTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Channel model = BinaryData.fromString( - "{\"channelName\":\"Channel\",\"etag\":\"ozwyiftyhxhuro\",\"provisioningState\":\"tyxolniwpwc\",\"location\":\"jfkgiawxk\"}") + "{\"channelName\":\"Channel\",\"etag\":\"fqka\",\"provisioningState\":\"wiipfpub\",\"location\":\"bwwift\"}") .toObject(Channel.class); - Assertions.assertEquals("ozwyiftyhxhuro", model.etag()); - Assertions.assertEquals("jfkgiawxk", model.location()); + Assertions.assertEquals("fqka", model.etag()); + Assertions.assertEquals("bwwift", model.location()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Channel model = new Channel().withEtag("ozwyiftyhxhuro").withLocation("jfkgiawxk"); + Channel model = new Channel().withEtag("fqka").withLocation("bwwift"); model = BinaryData.fromObject(model).toObject(Channel.class); - Assertions.assertEquals("ozwyiftyhxhuro", model.etag()); - Assertions.assertEquals("jfkgiawxk", model.location()); + Assertions.assertEquals("fqka", model.etag()); + Assertions.assertEquals("bwwift", model.location()); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ChannelsCreateWithResponseMockTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ChannelsCreateWithResponseMockTests.java index 229202bd2e79..73f3cdc0f2a5 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ChannelsCreateWithResponseMockTests.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ChannelsCreateWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.botservice.BotServiceManager; import com.azure.resourcemanager.botservice.fluent.models.BotChannelInner; @@ -29,33 +29,33 @@ public final class ChannelsCreateWithResponseMockTests { @Test public void testCreateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"channelName\":\"Channel\",\"etag\":\"itc\",\"provisioningState\":\"fcktqumiekke\",\"location\":\"ikh\"},\"sku\":{\"name\":\"F0\",\"tier\":\"Free\"},\"kind\":\"sdk\",\"etag\":\"gge\",\"zones\":[\"nyga\",\"qidbqfatpxllrxcy\",\"moadsuvarmy\"],\"location\":\"dmjsjqb\",\"tags\":{\"kxkgymareqna\":\"yxxrwlycoduh\",\"ssofwqmzqa\":\"xqugjhkycubedd\",\"nbyxbaaabjyv\":\"krmnjijpxacqqud\",\"xnevfdnwn\":\"yffimrzrtuzqogs\"},\"id\":\"mewzsyyc\",\"name\":\"uzsoi\",\"type\":\"judpfrxt\"}"; + = "{\"properties\":{\"channelName\":\"Channel\",\"etag\":\"sqvdaeyygux\",\"provisioningState\":\"jsqzhzbezk\",\"location\":\"msidxasicddyvv\"},\"location\":\"kgfmocwahpq\",\"tags\":{\"akz\":\"jeaahhvjhh\",\"xvxevblbjednljla\":\"bbjjidjksyxk\",\"smjbnkppxyn\":\"euaulxu\"},\"sku\":{\"name\":\"F0\",\"tier\":\"Free\"},\"kind\":\"azurebot\",\"etag\":\"zzgwklnsrm\",\"zones\":[\"ycxcktpiym\",\"rteeamm\",\"qiekkkzddrt\",\"g\"],\"id\":\"jbmxvavre\",\"name\":\"de\",\"type\":\"svecuijpxtxs\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); BotServiceManager manager = BotServiceManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); BotChannel response = manager.channels() - .createWithResponse("cjzkzivgvvcna", "rhyrnxxmueed", ChannelName.FACEBOOK_CHANNEL, - new BotChannelInner().withLocation("fnjhfjxwmszkkfo") - .withTags(mapOf("jawneaiv", "yfkzik", "elsfeaen", "wczelpci", "dxbjhwuaanozj", "abfatkl")) - .withProperties(new Channel().withEtag("v").withLocation("d")) + .createWithResponse("slynsqyrpfoo", "rlttymsjnygqdnfw", ChannelName.DIRECT_LINE_SPEECH_CHANNEL, + new BotChannelInner().withProperties(new Channel().withEtag("gtilax").withLocation("uwivkxoy")) + .withLocation("nbixxrti") + .withTags(mapOf("tso", "pwpgclrci", "pdnqqskawaoqvmmb", "frkenxpmyyefrp")) .withSku(new Sku().withName(SkuName.F0)) .withKind(Kind.FUNCTION) - .withEtag("gpiohgwxrtfudxe"), + .withEtag("kzmegnitgvkxlz"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("dmjsjqb", response.location()); - Assertions.assertEquals("yxxrwlycoduh", response.tags().get("kxkgymareqna")); - Assertions.assertEquals("itc", response.properties().etag()); - Assertions.assertEquals("ikh", response.properties().location()); + Assertions.assertEquals("sqvdaeyygux", response.properties().etag()); + Assertions.assertEquals("msidxasicddyvv", response.properties().location()); + Assertions.assertEquals("kgfmocwahpq", response.location()); + Assertions.assertEquals("jeaahhvjhh", response.tags().get("akz")); Assertions.assertEquals(SkuName.F0, response.sku().name()); - Assertions.assertEquals(Kind.SDK, response.kind()); - Assertions.assertEquals("gge", response.etag()); + Assertions.assertEquals(Kind.AZUREBOT, response.kind()); + Assertions.assertEquals("zzgwklnsrm", response.etag()); } // Use "Map.of" if available diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ChannelsDeleteWithResponseMockTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ChannelsDeleteWithResponseMockTests.java index 38510ff298a4..c5a304744d01 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ChannelsDeleteWithResponseMockTests.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ChannelsDeleteWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.botservice.BotServiceManager; import java.nio.charset.StandardCharsets; @@ -25,9 +25,9 @@ public void testDeleteWithResponse() throws Exception { BotServiceManager manager = BotServiceManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - manager.channels().deleteWithResponse("sgsahmkycgr", "uwjuetaeburuvdmo", "s", com.azure.core.util.Context.NONE); + manager.channels().deleteWithResponse("qtgdqohmcwsl", "riz", "tpwb", com.azure.core.util.Context.NONE); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ChannelsGetWithResponseMockTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ChannelsGetWithResponseMockTests.java index 54c6fd5a97ff..163d5ef5d088 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ChannelsGetWithResponseMockTests.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ChannelsGetWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.botservice.BotServiceManager; import com.azure.resourcemanager.botservice.models.BotChannel; @@ -23,25 +23,25 @@ public final class ChannelsGetWithResponseMockTests { @Test public void testGetWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"channelName\":\"Channel\",\"etag\":\"ntuji\",\"provisioningState\":\"jed\",\"location\":\"wwa\"},\"sku\":{\"name\":\"F0\",\"tier\":\"Standard\"},\"kind\":\"designer\",\"etag\":\"pzfoqoui\",\"zones\":[\"xarzgszufoxciq\",\"p\",\"doamciodhkha\",\"xkhnzbonlwnto\"],\"location\":\"gokdwbwhks\",\"tags\":{\"xztvbtqgsfraoyzk\":\"mrv\",\"yuuximerqfobwyzn\":\"owtlmnguxawqald\"},\"id\":\"bykutw\",\"name\":\"fhpagmhrskdsnf\",\"type\":\"sd\"}"; + = "{\"properties\":{\"channelName\":\"Channel\",\"etag\":\"xgsg\",\"provisioningState\":\"fgzdjtxvz\",\"location\":\"bqvgaqv\"},\"location\":\"a\",\"tags\":{\"etnwsdtutnw\":\"usrd\",\"vuzhyr\":\"duy\",\"ekdxuku\":\"ewipm\"},\"sku\":{\"name\":\"S1\",\"tier\":\"Standard\"},\"kind\":\"azurebot\",\"etag\":\"dxgketwzhhzjhfj\",\"zones\":[\"vmuvgpmu\"],\"id\":\"qsxvmhf\",\"name\":\"uzjyihsasbhudypo\",\"type\":\"yue\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); BotServiceManager manager = BotServiceManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); BotChannel response = manager.channels() - .getWithResponse("zlxwabmqoefkifr", "tpuqujmq", "gkfbtndoaong", com.azure.core.util.Context.NONE) + .getWithResponse("jrajcivm", "ghfcfiwrxgkneuvy", "nzqodfvpg", com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("gokdwbwhks", response.location()); - Assertions.assertEquals("mrv", response.tags().get("xztvbtqgsfraoyzk")); - Assertions.assertEquals("ntuji", response.properties().etag()); - Assertions.assertEquals("wwa", response.properties().location()); - Assertions.assertEquals(SkuName.F0, response.sku().name()); - Assertions.assertEquals(Kind.DESIGNER, response.kind()); - Assertions.assertEquals("pzfoqoui", response.etag()); + Assertions.assertEquals("xgsg", response.properties().etag()); + Assertions.assertEquals("bqvgaqv", response.properties().location()); + Assertions.assertEquals("a", response.location()); + Assertions.assertEquals("usrd", response.tags().get("etnwsdtutnw")); + Assertions.assertEquals(SkuName.S1, response.sku().name()); + Assertions.assertEquals(Kind.AZUREBOT, response.kind()); + Assertions.assertEquals("dxgketwzhhzjhfj", response.etag()); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ChannelsListByResourceGroupMockTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ChannelsListByResourceGroupMockTests.java index 6bf0477d2914..33cb4991ec8f 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ChannelsListByResourceGroupMockTests.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ChannelsListByResourceGroupMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.botservice.BotServiceManager; import com.azure.resourcemanager.botservice.models.BotChannel; @@ -24,24 +24,24 @@ public final class ChannelsListByResourceGroupMockTests { @Test public void testListByResourceGroup() throws Exception { String responseStr - = "{\"value\":[{\"properties\":{\"channelName\":\"Channel\",\"etag\":\"hoftr\",\"provisioningState\":\"equi\",\"location\":\"xicslfao\"},\"sku\":{\"name\":\"S1\",\"tier\":\"Standard\"},\"kind\":\"designer\",\"etag\":\"alnswhccsphk\",\"zones\":[\"witqscywuggwoluh\",\"zbwemh\",\"i\"],\"location\":\"sbrgz\",\"tags\":{\"pqwd\":\"swe\",\"mkttlstvlzywem\":\"ggicccnxqhue\",\"lusiy\":\"zrncsdt\",\"cy\":\"bsfgytguslfea\"},\"id\":\"qukyhejhzi\",\"name\":\"xgfpelolppv\",\"type\":\"srp\"}]}"; + = "{\"value\":[{\"properties\":{\"channelName\":\"Channel\",\"etag\":\"nkjpdnjzha\",\"provisioningState\":\"ylhjlm\",\"location\":\"y\"},\"location\":\"rimrs\",\"tags\":{\"stvasylwxdzaumw\":\"eecjmeis\",\"fuzboyjathwtzolb\":\"oohgu\",\"jpahlxvea\":\"emwmdxmebwjs\"},\"sku\":{\"name\":\"F0\",\"tier\":\"Standard\"},\"kind\":\"sdk\",\"etag\":\"qtibxyijddtv\",\"zones\":[\"tad\",\"jaeukmrsieekpn\"],\"id\":\"aapm\",\"name\":\"dqmeqwigpibudq\",\"type\":\"yxeb\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); BotServiceManager manager = BotServiceManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response - = manager.channels().listByResourceGroup("hziuiefozbhdms", "l", com.azure.core.util.Context.NONE); + = manager.channels().listByResourceGroup("a", "llibphbqzmizak", com.azure.core.util.Context.NONE); - Assertions.assertEquals("sbrgz", response.iterator().next().location()); - Assertions.assertEquals("swe", response.iterator().next().tags().get("pqwd")); - Assertions.assertEquals("hoftr", response.iterator().next().properties().etag()); - Assertions.assertEquals("xicslfao", response.iterator().next().properties().location()); - Assertions.assertEquals(SkuName.S1, response.iterator().next().sku().name()); - Assertions.assertEquals(Kind.DESIGNER, response.iterator().next().kind()); - Assertions.assertEquals("alnswhccsphk", response.iterator().next().etag()); + Assertions.assertEquals("nkjpdnjzha", response.iterator().next().properties().etag()); + Assertions.assertEquals("y", response.iterator().next().properties().location()); + Assertions.assertEquals("rimrs", response.iterator().next().location()); + Assertions.assertEquals("eecjmeis", response.iterator().next().tags().get("stvasylwxdzaumw")); + Assertions.assertEquals(SkuName.F0, response.iterator().next().sku().name()); + Assertions.assertEquals(Kind.SDK, response.iterator().next().kind()); + Assertions.assertEquals("qtibxyijddtv", response.iterator().next().etag()); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ChannelsUpdateWithResponseMockTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ChannelsUpdateWithResponseMockTests.java index 6f730cc087eb..fdc1eee0be7c 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ChannelsUpdateWithResponseMockTests.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ChannelsUpdateWithResponseMockTests.java @@ -1,13 +1,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.botservice.BotServiceManager; import com.azure.resourcemanager.botservice.fluent.models.BotChannelInner; @@ -29,34 +29,33 @@ public final class ChannelsUpdateWithResponseMockTests { @Test public void testUpdateWithResponse() throws Exception { String responseStr - = "{\"properties\":{\"channelName\":\"Channel\",\"etag\":\"rbuukzclewyhmlwp\",\"provisioningState\":\"tzpofncckwyfzq\",\"location\":\"xxbuyq\"},\"sku\":{\"name\":\"S1\",\"tier\":\"Free\"},\"kind\":\"azurebot\",\"etag\":\"ppriol\",\"zones\":[\"jaltolmnc\",\"sobqw\",\"sdbnwdcfhucqdpf\"],\"location\":\"vglsbjjca\",\"tags\":{\"xqtvcofu\":\"bvtvudutncormr\",\"vkg\":\"f\"},\"id\":\"u\",\"name\":\"gdknnqv\",\"type\":\"aznqntoru\"}"; + = "{\"properties\":{\"channelName\":\"Channel\",\"etag\":\"gc\",\"provisioningState\":\"nfnw\",\"location\":\"tmvpdvjdhtt\"},\"location\":\"efedxihchrphkm\",\"tags\":{\"fzpbgtgkyl\":\"dqns\",\"jeuut\":\"dgh\",\"bwnhhtql\":\"wxezwzhok\"},\"sku\":{\"name\":\"S1\",\"tier\":\"Standard\"},\"kind\":\"designer\",\"etag\":\"ifhpf\",\"zones\":[\"jvgcxtx\",\"csheafidltugsr\",\"smkss\",\"h\"],\"id\":\"ftxfkf\",\"name\":\"egprhptil\",\"type\":\"ucb\"}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); BotServiceManager manager = BotServiceManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); BotChannel response = manager.channels() - .updateWithResponse("thzvaytdwkqbrqu", "paxh", ChannelName.DIRECT_LINE_CHANNEL, - new BotChannelInner().withLocation("lwnwxuqlcvydyp") - .withTags(mapOf("ujhemmsbvdkcrodt", "ooaojkniodkooebw", "kdlfoa", "infwjlfltkacjve", "qblylsyxkqj", - "ggkfpagaowpul", "gxsds", "sjervti")) - .withProperties(new Channel().withEtag("livpdt").withLocation("d")) - .withSku(new Sku().withName(SkuName.S1)) + .updateWithResponse("wprtu", "wsawddjibabxvi", ChannelName.SLACK_CHANNEL, + new BotChannelInner().withProperties(new Channel().withEtag("tzeexav").withLocation("m")) + .withLocation("bwpypqtgsfjacb") + .withTags(mapOf("sirudhzmmesckdlp", "hxudbxvodht", "xdfgsftufqobr", "gzrcxfailcfxwmdb")) + .withSku(new Sku().withName(SkuName.F0)) .withKind(Kind.BOT) - .withEtag("fgsqu"), + .withEtag("kknhxkizvytnrzv"), com.azure.core.util.Context.NONE) .getValue(); - Assertions.assertEquals("vglsbjjca", response.location()); - Assertions.assertEquals("bvtvudutncormr", response.tags().get("xqtvcofu")); - Assertions.assertEquals("rbuukzclewyhmlwp", response.properties().etag()); - Assertions.assertEquals("xxbuyq", response.properties().location()); + Assertions.assertEquals("gc", response.properties().etag()); + Assertions.assertEquals("tmvpdvjdhtt", response.properties().location()); + Assertions.assertEquals("efedxihchrphkm", response.location()); + Assertions.assertEquals("dqns", response.tags().get("fzpbgtgkyl")); Assertions.assertEquals(SkuName.S1, response.sku().name()); - Assertions.assertEquals(Kind.AZUREBOT, response.kind()); - Assertions.assertEquals("ppriol", response.etag()); + Assertions.assertEquals(Kind.DESIGNER, response.kind()); + Assertions.assertEquals("ifhpf", response.etag()); } // Use "Map.of" if available diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/CheckNameAvailabilityRequestBodyTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/CheckNameAvailabilityRequestBodyTests.java index 19c5add2b857..a8bcc8d59d77 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/CheckNameAvailabilityRequestBodyTests.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/CheckNameAvailabilityRequestBodyTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -11,19 +11,18 @@ public final class CheckNameAvailabilityRequestBodyTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - CheckNameAvailabilityRequestBody model - = BinaryData.fromString("{\"name\":\"hrzayvvtpgvdf\",\"type\":\"otkftutqxlngx\"}") - .toObject(CheckNameAvailabilityRequestBody.class); - Assertions.assertEquals("hrzayvvtpgvdf", model.name()); - Assertions.assertEquals("otkftutqxlngx", model.type()); + CheckNameAvailabilityRequestBody model = BinaryData.fromString("{\"name\":\"gylgqgitxmedjvcs\",\"type\":\"n\"}") + .toObject(CheckNameAvailabilityRequestBody.class); + Assertions.assertEquals("gylgqgitxmedjvcs", model.name()); + Assertions.assertEquals("n", model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { CheckNameAvailabilityRequestBody model - = new CheckNameAvailabilityRequestBody().withName("hrzayvvtpgvdf").withType("otkftutqxlngx"); + = new CheckNameAvailabilityRequestBody().withName("gylgqgitxmedjvcs").withType("n"); model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityRequestBody.class); - Assertions.assertEquals("hrzayvvtpgvdf", model.name()); - Assertions.assertEquals("otkftutqxlngx", model.type()); + Assertions.assertEquals("gylgqgitxmedjvcs", model.name()); + Assertions.assertEquals("n", model.type()); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/CreateEmailSignInUrlResponseInnerTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/CreateEmailSignInUrlResponseInnerTests.java new file mode 100644 index 000000000000..d6bac8b16689 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/CreateEmailSignInUrlResponseInnerTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.botservice.fluent.models.CreateEmailSignInUrlResponseInner; +import org.junit.jupiter.api.Assertions; + +public final class CreateEmailSignInUrlResponseInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CreateEmailSignInUrlResponseInner model = BinaryData + .fromString("{\"id\":\"dkwobdagx\",\"location\":\"bqdxbx\",\"properties\":{\"url\":\"bogqxndlkzgxhu\"}}") + .toObject(CreateEmailSignInUrlResponseInner.class); + Assertions.assertEquals("bqdxbx", model.location()); + Assertions.assertEquals("bogqxndlkzgxhu", model.properties().url()); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/CreateEmailSignInUrlResponsePropertiesTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/CreateEmailSignInUrlResponsePropertiesTests.java new file mode 100644 index 000000000000..664d8b8230d4 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/CreateEmailSignInUrlResponsePropertiesTests.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.botservice.models.CreateEmailSignInUrlResponseProperties; +import org.junit.jupiter.api.Assertions; + +public final class CreateEmailSignInUrlResponsePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + CreateEmailSignInUrlResponseProperties model + = BinaryData.fromString("{\"url\":\"plbpodxun\"}").toObject(CreateEmailSignInUrlResponseProperties.class); + Assertions.assertEquals("plbpodxun", model.url()); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/EmailsCreateSignInUrlWithResponseMockTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/EmailsCreateSignInUrlWithResponseMockTests.java new file mode 100644 index 000000000000..9190417905ca --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/EmailsCreateSignInUrlWithResponseMockTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.botservice.BotServiceManager; +import com.azure.resourcemanager.botservice.models.CreateEmailSignInUrlResponse; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class EmailsCreateSignInUrlWithResponseMockTests { + @Test + public void testCreateSignInUrlWithResponse() throws Exception { + String responseStr = "{\"id\":\"cact\",\"location\":\"wotey\",\"properties\":{\"url\":\"luqovekqvg\"}}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + BotServiceManager manager = BotServiceManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + CreateEmailSignInUrlResponse response = manager.emails() + .createSignInUrlWithResponse("lhzdsqtzb", "rgnowcjhfgm", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("wotey", response.location()); + Assertions.assertEquals("luqovekqvg", response.properties().url()); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/M365ExtensionsTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/M365ExtensionsTests.java index c893391623fc..e238bffc805f 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/M365ExtensionsTests.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/M365ExtensionsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -12,17 +12,17 @@ public final class M365ExtensionsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { M365Extensions model = BinaryData.fromString( - "{\"channelName\":\"M365Extensions\",\"etag\":\"olbgycduiertgccy\",\"provisioningState\":\"aolps\",\"location\":\"qlfmmdnbb\"}") + "{\"channelName\":\"M365Extensions\",\"etag\":\"oakgtdlmkkzev\",\"provisioningState\":\"hewpusdsttwv\",\"location\":\"vbbejdcng\"}") .toObject(M365Extensions.class); - Assertions.assertEquals("olbgycduiertgccy", model.etag()); - Assertions.assertEquals("qlfmmdnbb", model.location()); + Assertions.assertEquals("oakgtdlmkkzev", model.etag()); + Assertions.assertEquals("vbbejdcng", model.location()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - M365Extensions model = new M365Extensions().withEtag("olbgycduiertgccy").withLocation("qlfmmdnbb"); + M365Extensions model = new M365Extensions().withEtag("oakgtdlmkkzev").withLocation("vbbejdcng"); model = BinaryData.fromObject(model).toObject(M365Extensions.class); - Assertions.assertEquals("olbgycduiertgccy", model.etag()); - Assertions.assertEquals("qlfmmdnbb", model.location()); + Assertions.assertEquals("oakgtdlmkkzev", model.etag()); + Assertions.assertEquals("vbbejdcng", model.location()); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/MsTeamsChannelPropertiesTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/MsTeamsChannelPropertiesTests.java index 3babe8d8e030..27533a79a6ad 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/MsTeamsChannelPropertiesTests.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/MsTeamsChannelPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -12,30 +12,30 @@ public final class MsTeamsChannelPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MsTeamsChannelProperties model = BinaryData.fromString( - "{\"enableCalling\":false,\"callingWebhook\":\"sgwbnbbeld\",\"isEnabled\":false,\"incomingCallRoute\":\"zbaliourqha\",\"deploymentEnvironment\":\"uhashsfwx\",\"acceptedTerms\":false}") + "{\"enableCalling\":false,\"callingWebhook\":\"dvwvgpio\",\"isEnabled\":false,\"incomingCallRoute\":\"xrtfudxep\",\"deploymentEnvironment\":\"yqagvrvm\",\"acceptedTerms\":false}") .toObject(MsTeamsChannelProperties.class); - Assertions.assertEquals(false, model.enableCalling()); - Assertions.assertEquals("sgwbnbbeld", model.callingWebhook()); - Assertions.assertEquals(false, model.isEnabled()); - Assertions.assertEquals("zbaliourqha", model.incomingCallRoute()); - Assertions.assertEquals("uhashsfwx", model.deploymentEnvironment()); - Assertions.assertEquals(false, model.acceptedTerms()); + Assertions.assertFalse(model.enableCalling()); + Assertions.assertEquals("dvwvgpio", model.callingWebhook()); + Assertions.assertFalse(model.isEnabled()); + Assertions.assertEquals("xrtfudxep", model.incomingCallRoute()); + Assertions.assertEquals("yqagvrvm", model.deploymentEnvironment()); + Assertions.assertFalse(model.acceptedTerms()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { MsTeamsChannelProperties model = new MsTeamsChannelProperties().withEnableCalling(false) - .withCallingWebhook("sgwbnbbeld") + .withCallingWebhook("dvwvgpio") .withIsEnabled(false) - .withIncomingCallRoute("zbaliourqha") - .withDeploymentEnvironment("uhashsfwx") + .withIncomingCallRoute("xrtfudxep") + .withDeploymentEnvironment("yqagvrvm") .withAcceptedTerms(false); model = BinaryData.fromObject(model).toObject(MsTeamsChannelProperties.class); - Assertions.assertEquals(false, model.enableCalling()); - Assertions.assertEquals("sgwbnbbeld", model.callingWebhook()); - Assertions.assertEquals(false, model.isEnabled()); - Assertions.assertEquals("zbaliourqha", model.incomingCallRoute()); - Assertions.assertEquals("uhashsfwx", model.deploymentEnvironment()); - Assertions.assertEquals(false, model.acceptedTerms()); + Assertions.assertFalse(model.enableCalling()); + Assertions.assertEquals("dvwvgpio", model.callingWebhook()); + Assertions.assertFalse(model.isEnabled()); + Assertions.assertEquals("xrtfudxep", model.incomingCallRoute()); + Assertions.assertEquals("yqagvrvm", model.deploymentEnvironment()); + Assertions.assertFalse(model.acceptedTerms()); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/MsTeamsChannelTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/MsTeamsChannelTests.java index cf8ab3160fdb..fd63968b5b81 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/MsTeamsChannelTests.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/MsTeamsChannelTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -13,36 +13,36 @@ public final class MsTeamsChannelTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { MsTeamsChannel model = BinaryData.fromString( - "{\"channelName\":\"MsTeamsChannel\",\"properties\":{\"enableCalling\":true,\"callingWebhook\":\"mx\",\"isEnabled\":true,\"incomingCallRoute\":\"vt\",\"deploymentEnvironment\":\"lmqkrhahvlj\",\"acceptedTerms\":false},\"etag\":\"quhcdhmduala\",\"provisioningState\":\"qpv\",\"location\":\"dmwsrcrgvxpvgomz\"}") + "{\"channelName\":\"MsTeamsChannel\",\"properties\":{\"enableCalling\":false,\"callingWebhook\":\"uipiccjzk\",\"isEnabled\":false,\"incomingCallRoute\":\"gvvcnayrhyr\",\"deploymentEnvironment\":\"xmueed\",\"acceptedTerms\":true},\"etag\":\"v\",\"provisioningState\":\"kwqqtchealmf\",\"location\":\"d\"}") .toObject(MsTeamsChannel.class); - Assertions.assertEquals("quhcdhmduala", model.etag()); - Assertions.assertEquals("dmwsrcrgvxpvgomz", model.location()); - Assertions.assertEquals(true, model.properties().enableCalling()); - Assertions.assertEquals("mx", model.properties().callingWebhook()); - Assertions.assertEquals(true, model.properties().isEnabled()); - Assertions.assertEquals("vt", model.properties().incomingCallRoute()); - Assertions.assertEquals("lmqkrhahvlj", model.properties().deploymentEnvironment()); - Assertions.assertEquals(false, model.properties().acceptedTerms()); + Assertions.assertEquals("v", model.etag()); + Assertions.assertEquals("d", model.location()); + Assertions.assertFalse(model.properties().enableCalling()); + Assertions.assertEquals("uipiccjzk", model.properties().callingWebhook()); + Assertions.assertFalse(model.properties().isEnabled()); + Assertions.assertEquals("gvvcnayrhyr", model.properties().incomingCallRoute()); + Assertions.assertEquals("xmueed", model.properties().deploymentEnvironment()); + Assertions.assertTrue(model.properties().acceptedTerms()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - MsTeamsChannel model = new MsTeamsChannel().withEtag("quhcdhmduala") - .withLocation("dmwsrcrgvxpvgomz") - .withProperties(new MsTeamsChannelProperties().withEnableCalling(true) - .withCallingWebhook("mx") - .withIsEnabled(true) - .withIncomingCallRoute("vt") - .withDeploymentEnvironment("lmqkrhahvlj") - .withAcceptedTerms(false)); + MsTeamsChannel model = new MsTeamsChannel().withEtag("v") + .withLocation("d") + .withProperties(new MsTeamsChannelProperties().withEnableCalling(false) + .withCallingWebhook("uipiccjzk") + .withIsEnabled(false) + .withIncomingCallRoute("gvvcnayrhyr") + .withDeploymentEnvironment("xmueed") + .withAcceptedTerms(true)); model = BinaryData.fromObject(model).toObject(MsTeamsChannel.class); - Assertions.assertEquals("quhcdhmduala", model.etag()); - Assertions.assertEquals("dmwsrcrgvxpvgomz", model.location()); - Assertions.assertEquals(true, model.properties().enableCalling()); - Assertions.assertEquals("mx", model.properties().callingWebhook()); - Assertions.assertEquals(true, model.properties().isEnabled()); - Assertions.assertEquals("vt", model.properties().incomingCallRoute()); - Assertions.assertEquals("lmqkrhahvlj", model.properties().deploymentEnvironment()); - Assertions.assertEquals(false, model.properties().acceptedTerms()); + Assertions.assertEquals("v", model.etag()); + Assertions.assertEquals("d", model.location()); + Assertions.assertFalse(model.properties().enableCalling()); + Assertions.assertEquals("uipiccjzk", model.properties().callingWebhook()); + Assertions.assertFalse(model.properties().isEnabled()); + Assertions.assertEquals("gvvcnayrhyr", model.properties().incomingCallRoute()); + Assertions.assertEquals("xmueed", model.properties().deploymentEnvironment()); + Assertions.assertTrue(model.properties().acceptedTerms()); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationInnerTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationInnerTests.java new file mode 100644 index 000000000000..319a827c75cc --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationInnerTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.botservice.fluent.models.NetworkSecurityPerimeterConfigurationInner; +import com.azure.resourcemanager.botservice.models.ProvisioningState; +import org.junit.jupiter.api.Assertions; + +public final class NetworkSecurityPerimeterConfigurationInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkSecurityPerimeterConfigurationInner model = BinaryData.fromString( + "{\"properties\":{\"provisioningState\":\"Creating\",\"provisioningIssues\":[{\"name\":\"rxybz\",\"properties\":{\"issueType\":\"dqytbciqfouflmm\",\"severity\":\"Warning\",\"description\":\"modmglougpb\",\"suggestedResourceIds\":[\"mutduqktaps\"],\"suggestedAccessRules\":[{}]}},{\"name\":\"uertumk\",\"properties\":{\"issueType\":\"vqwhbmdgbbjfd\",\"severity\":\"Error\",\"description\":\"mbe\",\"suggestedResourceIds\":[\"bhtqqrolfpfpsa\",\"gbquxigj\",\"jgzjaoyfhrtx\",\"lnerkujysvleju\"],\"suggestedAccessRules\":[{},{},{}]}},{\"name\":\"wrlyxwjkcprb\",\"properties\":{\"issueType\":\"xgjvtbv\",\"severity\":\"Warning\",\"description\":\"zdn\",\"suggestedResourceIds\":[\"qguhmuo\"],\"suggestedAccessRules\":[{}]}}],\"networkSecurityPerimeter\":{\"id\":\"wzwbnguitn\",\"perimeterGuid\":\"izgazxu\",\"location\":\"zuckyfi\"},\"resourceAssociation\":{\"name\":\"idf\",\"accessMode\":\"Audit\"},\"profile\":{\"name\":\"uht\",\"accessRulesVersion\":7093196131799680709,\"accessRules\":[{\"name\":\"fthwxmnteiwa\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"jcmmxdcufufsrp\",\"mzidnsezcxtb\"],\"subscriptions\":[{},{}],\"networkSecurityPerimeters\":[{}],\"fullyQualifiedDomainNames\":[\"sne\"],\"emailAddresses\":[\"wzjeiach\",\"oosflnr\",\"sfqpteehz\"],\"phoneNumbers\":[\"pyqr\",\"mzinpvswjdk\",\"rsoodqxhcrmnoh\"]}},{\"name\":\"ckwhds\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"pjxsqwpgrjbznor\"],\"subscriptions\":[{}],\"networkSecurityPerimeters\":[{}],\"fullyQualifiedDomainNames\":[\"yxqabnmocpcyshur\",\"afbljjgpbtoqcjmk\"],\"emailAddresses\":[\"vbqid\"],\"phoneNumbers\":[\"jzyulpk\",\"dj\"]}},{\"name\":\"lkhbz\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"gqexzlocxs\",\"paierh\"],\"subscriptions\":[{},{}],\"networkSecurityPerimeters\":[{}],\"fullyQualifiedDomainNames\":[\"mmajtjaodx\",\"bnbdxkqpxokajion\",\"imexgstxgcpodgma\"],\"emailAddresses\":[\"mvdjwzrlovmc\"],\"phoneNumbers\":[\"ijcoejctb\",\"aqsqsycbkbfk\"]}}],\"diagnosticSettingsVersion\":6954441473774697621,\"enabledLogCategories\":[\"xxppofm\",\"axcfjpgddtocjjx\",\"vpmouexhdzxib\",\"eojnxqbzvddn\"]}},\"id\":\"ndei\",\"name\":\"btwnpzaoqvuhrhcf\",\"type\":\"cyddglmjthjqk\"}") + .toObject(NetworkSecurityPerimeterConfigurationInner.class); + Assertions.assertEquals(ProvisioningState.CREATING, model.properties().provisioningState()); + Assertions.assertEquals("rxybz", model.properties().provisioningIssues().get(0).name()); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationListTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationListTests.java new file mode 100644 index 000000000000..8673c93b741f --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationListTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.botservice.implementation.models.NetworkSecurityPerimeterConfigurationList; +import org.junit.jupiter.api.Assertions; + +public final class NetworkSecurityPerimeterConfigurationListTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkSecurityPerimeterConfigurationList model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"provisioningState\":\"Updating\",\"provisioningIssues\":[{\"name\":\"ivetvtcq\",\"properties\":{}},{\"name\":\"doqmcbxvwvxys\",\"properties\":{}}],\"networkSecurityPerimeter\":{\"id\":\"sfxobl\",\"perimeterGuid\":\"k\",\"location\":\"mpew\"},\"resourceAssociation\":{\"name\":\"bkrvrnsvshqj\",\"accessMode\":\"Enforced\"},\"profile\":{\"name\":\"sbfov\",\"accessRulesVersion\":740852722562408962,\"accessRules\":[{}],\"diagnosticSettingsVersion\":8133547677747948379,\"enabledLogCategories\":[\"fsubcgjbirxbpy\",\"srfbjfdtwss\",\"t\"]}},\"id\":\"pvjzbe\",\"name\":\"ilzznfqqnvwp\",\"type\":\"qtaruoujmkcjhwq\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"provisioningIssues\":[{\"name\":\"wj\",\"properties\":{}}],\"networkSecurityPerimeter\":{\"id\":\"rjerv\",\"perimeterGuid\":\"enq\",\"location\":\"hin\"},\"resourceAssociation\":{\"name\":\"gmifthnzd\",\"accessMode\":\"Learning\"},\"profile\":{\"name\":\"nayqi\",\"accessRulesVersion\":6131994767406394779,\"accessRules\":[{},{},{},{}],\"diagnosticSettingsVersion\":3972584781562834775,\"enabledLogCategories\":[\"kthumaqolbgycdui\",\"r\"]}},\"id\":\"ccymvaolpsslql\",\"name\":\"mmdnbbglzps\",\"type\":\"iydmcwyhzdxs\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"provisioningIssues\":[{\"name\":\"vdfznudaodvxzb\",\"properties\":{}},{\"name\":\"lylpstdb\",\"properties\":{}}],\"networkSecurityPerimeter\":{\"id\":\"rzdzucerscdnt\",\"perimeterGuid\":\"vfiwjmygtdss\",\"location\":\"wtmwerio\"},\"resourceAssociation\":{\"name\":\"yqsemwa\",\"accessMode\":\"Learning\"},\"profile\":{\"name\":\"hhszh\",\"accessRulesVersion\":6111204244847646570,\"accessRules\":[{},{}],\"diagnosticSettingsVersion\":3656399459546338936,\"enabledLogCategories\":[\"wmbesldnkw\",\"tppjflcx\"]}},\"id\":\"aokonzmnsik\",\"name\":\"mkqzeqqkdltfzxmh\",\"type\":\"v\"}],\"nextLink\":\"ur\"}") + .toObject(NetworkSecurityPerimeterConfigurationList.class); + Assertions.assertEquals("ur", model.nextLink()); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationPropertiesTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationPropertiesTests.java new file mode 100644 index 000000000000..a9c456e21736 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationPropertiesTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.botservice.models.NetworkSecurityPerimeterConfigurationProperties; +import com.azure.resourcemanager.botservice.models.ProvisioningState; +import org.junit.jupiter.api.Assertions; + +public final class NetworkSecurityPerimeterConfigurationPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkSecurityPerimeterConfigurationProperties model = BinaryData.fromString( + "{\"provisioningState\":\"Succeeded\",\"provisioningIssues\":[{\"name\":\"xmqci\",\"properties\":{\"issueType\":\"hkh\",\"severity\":\"Error\",\"description\":\"gdtopbobjogh\",\"suggestedResourceIds\":[\"u\"],\"suggestedAccessRules\":[{\"name\":\"hrzayvvtpgvdf\",\"properties\":{}}]}}],\"networkSecurityPerimeter\":{\"id\":\"kftutqxlngxlefg\",\"perimeterGuid\":\"nxkrx\",\"location\":\"mi\"},\"resourceAssociation\":{\"name\":\"hzrvqd\",\"accessMode\":\"Audit\"},\"profile\":{\"name\":\"yb\",\"accessRulesVersion\":3598181183980529277,\"accessRules\":[{\"name\":\"bowsk\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"lcuiywgqywgndr\",\"ynhz\",\"pphrcgynco\",\"pec\"],\"subscriptions\":[{}],\"networkSecurityPerimeters\":[{},{},{}],\"fullyQualifiedDomainNames\":[\"fsxlzevgbmqjqa\"],\"emailAddresses\":[\"pmivkwlzu\"],\"phoneNumbers\":[\"fwnfnb\"]}},{\"name\":\"fionl\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"gtzxdpn\"],\"subscriptions\":[{}],\"networkSecurityPerimeters\":[{},{},{},{}],\"fullyQualifiedDomainNames\":[\"jfeallnwsub\",\"snjampmng\",\"zscxaqwo\",\"chcbonqvpkvlrxnj\"],\"emailAddresses\":[\"eipheoflokeyy\",\"enjbdlwtgrhp\"],\"phoneNumbers\":[\"jumasx\"]}}],\"diagnosticSettingsVersion\":7219276068713621515,\"enabledLogCategories\":[\"e\"]}}") + .toObject(NetworkSecurityPerimeterConfigurationProperties.class); + Assertions.assertEquals(ProvisioningState.SUCCEEDED, model.provisioningState()); + Assertions.assertEquals("xmqci", model.provisioningIssues().get(0).name()); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationsGetWithResponseMockTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationsGetWithResponseMockTests.java new file mode 100644 index 000000000000..1c0d466da5a3 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationsGetWithResponseMockTests.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.botservice.BotServiceManager; +import com.azure.resourcemanager.botservice.models.NetworkSecurityPerimeterConfiguration; +import com.azure.resourcemanager.botservice.models.ProvisioningState; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class NetworkSecurityPerimeterConfigurationsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Updating\",\"provisioningIssues\":[{\"name\":\"ruocbgo\",\"properties\":{\"issueType\":\"te\",\"severity\":\"Error\",\"description\":\"hjxa\",\"suggestedResourceIds\":[\"jgslordilmyww\",\"kgkxn\"],\"suggestedAccessRules\":[{}]}},{\"name\":\"b\",\"properties\":{\"issueType\":\"udtjuewbc\",\"severity\":\"Warning\",\"description\":\"uwhcjyxccybv\",\"suggestedResourceIds\":[\"akkud\"],\"suggestedAccessRules\":[{},{},{},{}]}},{\"name\":\"wjplma\",\"properties\":{\"issueType\":\"cyohpfkyrkdbd\",\"severity\":\"Error\",\"description\":\"sjkmnwqj\",\"suggestedResourceIds\":[\"aiy\",\"ddviacegfnmntfpm\",\"memfnczdwvvbalxl\",\"lchpodbzevwrdn\"],\"suggestedAccessRules\":[{}]}}],\"networkSecurityPerimeter\":{\"id\":\"vsjcswsmystuluqy\",\"perimeterGuid\":\"cvlerchpqbmfpjba\",\"location\":\"idfcxsspuunnoxyh\"},\"resourceAssociation\":{\"name\":\"qddrihpfhoqcaae\",\"accessMode\":\"Audit\"},\"profile\":{\"name\":\"djvlpj\",\"accessRulesVersion\":4808904277032773928,\"accessRules\":[{\"name\":\"sgeivsiy\",\"properties\":{}},{\"name\":\"dncj\",\"properties\":{}},{\"name\":\"nbzoggcu\",\"properties\":{}},{\"name\":\"z\",\"properties\":{}}],\"diagnosticSettingsVersion\":2873828836564205463,\"enabledLogCategories\":[\"tqxepn\",\"lbfu\"]}},\"id\":\"lyjt\",\"name\":\"vofqzhvfc\",\"type\":\"byfmowuxr\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + BotServiceManager manager = BotServiceManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + NetworkSecurityPerimeterConfiguration response = manager.networkSecurityPerimeterConfigurations() + .getWithResponse("kqqfk", "vscx", "dmligovibrxk", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals(ProvisioningState.UPDATING, response.properties().provisioningState()); + Assertions.assertEquals("ruocbgo", response.properties().provisioningIssues().get(0).name()); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationsListMockTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationsListMockTests.java new file mode 100644 index 000000000000..c51c7b2db52d --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationsListMockTests.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.botservice.BotServiceManager; +import com.azure.resourcemanager.botservice.models.NetworkSecurityPerimeterConfiguration; +import com.azure.resourcemanager.botservice.models.ProvisioningState; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class NetworkSecurityPerimeterConfigurationsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"provisioningState\":\"Accepted\",\"provisioningIssues\":[{\"name\":\"yzsxjrkambtrne\",\"properties\":{\"issueType\":\"nvuqeqvldspa\",\"severity\":\"Error\",\"description\":\"kkdmfl\",\"suggestedResourceIds\":[\"tmjlx\",\"ril\",\"zapeewchpx\"],\"suggestedAccessRules\":[{},{},{}]}},{\"name\":\"kuziycsle\",\"properties\":{\"issueType\":\"uztcktyhjtqed\",\"severity\":\"Error\",\"description\":\"lwmmrqzzrrjv\",\"suggestedResourceIds\":[\"ydzgkrvqeevtoe\",\"r\"],\"suggestedAccessRules\":[{}]}}],\"networkSecurityPerimeter\":{\"id\":\"ytp\",\"perimeterGuid\":\"mov\",\"location\":\"fvaawzqa\"},\"resourceAssociation\":{\"name\":\"gzuriglaecxndt\",\"accessMode\":\"Enforced\"},\"profile\":{\"name\":\"vzm\",\"accessRulesVersion\":231546792285942083,\"accessRules\":[{\"name\":\"x\",\"properties\":{}},{\"name\":\"irclnpk\",\"properties\":{}},{\"name\":\"yzriykhy\",\"properties\":{}}],\"diagnosticSettingsVersion\":203830983773868507,\"enabledLogCategories\":[\"oxqvkjlmxhomdynh\"]}},\"id\":\"digumbnr\",\"name\":\"auzzptjazysd\",\"type\":\"hezwwvaiq\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + BotServiceManager manager = BotServiceManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.networkSecurityPerimeterConfigurations().list("jpvd", "xfzwi", com.azure.core.util.Context.NONE); + + Assertions.assertEquals(ProvisioningState.ACCEPTED, + response.iterator().next().properties().provisioningState()); + Assertions.assertEquals("yzsxjrkambtrne", + response.iterator().next().properties().provisioningIssues().get(0).name()); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationsReconcileMockTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationsReconcileMockTests.java new file mode 100644 index 000000000000..3223cb9f547b --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterConfigurationsReconcileMockTests.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.botservice.BotServiceManager; +import com.azure.resourcemanager.botservice.models.NetworkSecurityPerimeterConfiguration; +import com.azure.resourcemanager.botservice.models.ProvisioningState; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class NetworkSecurityPerimeterConfigurationsReconcileMockTests { + @Test + public void testReconcile() throws Exception { + String responseStr + = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"provisioningIssues\":[{\"name\":\"csttijfybvpoekr\",\"properties\":{\"issueType\":\"gbdhuzqgnjdg\",\"severity\":\"Error\",\"description\":\"cli\",\"suggestedResourceIds\":[\"vhxnk\",\"mtk\"],\"suggestedAccessRules\":[{},{}]}},{\"name\":\"ppnvdxz\",\"properties\":{\"issueType\":\"hfrbbc\",\"severity\":\"Warning\",\"description\":\"gtltdhlf\",\"suggestedResourceIds\":[\"jpykvgtrdcnifmzz\",\"dymbrny\",\"u\"],\"suggestedAccessRules\":[{},{},{}]}},{\"name\":\"a\",\"properties\":{\"issueType\":\"ckh\",\"severity\":\"Warning\",\"description\":\"d\",\"suggestedResourceIds\":[\"wafqroud\",\"spave\",\"hrv\"],\"suggestedAccessRules\":[{}]}},{\"name\":\"zoz\",\"properties\":{\"issueType\":\"cxgkmoyxcdyui\",\"severity\":\"Warning\",\"description\":\"dnbzydvfvfcjn\",\"suggestedResourceIds\":[\"isrvhm\",\"orffukiscv\",\"mzhwplefaxvxi\",\"cbtgnhnz\"],\"suggestedAccessRules\":[{},{},{},{}]}}],\"networkSecurityPerimeter\":{\"id\":\"jjfzqlqhycavo\",\"perimeterGuid\":\"gxdbeesmie\",\"location\":\"lrariaawiu\"},\"resourceAssociation\":{\"name\":\"dwqf\",\"accessMode\":\"Enforced\"},\"profile\":{\"name\":\"fgiagtcojocqwo\",\"accessRulesVersion\":3056699249247760671,\"accessRules\":[{\"name\":\"sfzldmoz\",\"properties\":{}},{\"name\":\"lfsbtkadpysow\",\"properties\":{}}],\"diagnosticSettingsVersion\":1154240979019407664,\"enabledLogCategories\":[\"grjqctojcmi\"]}},\"id\":\"fieypefojyqdhcup\",\"name\":\"cp\",\"type\":\"cwkhihi\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + BotServiceManager manager = BotServiceManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + NetworkSecurityPerimeterConfiguration response = manager.networkSecurityPerimeterConfigurations() + .reconcile("uvvfonkp", "hqyikvy", "auy", com.azure.core.util.Context.NONE); + + Assertions.assertEquals(ProvisioningState.SUCCEEDED, response.properties().provisioningState()); + Assertions.assertEquals("csttijfybvpoekr", response.properties().provisioningIssues().get(0).name()); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterTests.java new file mode 100644 index 000000000000..a89c15ca1d64 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NetworkSecurityPerimeterTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.botservice.models.NetworkSecurityPerimeter; +import org.junit.jupiter.api.Assertions; + +public final class NetworkSecurityPerimeterTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NetworkSecurityPerimeter model + = BinaryData.fromString("{\"id\":\"gkbrpyyd\",\"perimeterGuid\":\"bnuqqkpik\",\"location\":\"rgvtqag\"}") + .toObject(NetworkSecurityPerimeter.class); + Assertions.assertEquals("bnuqqkpik", model.perimeterGuid()); + Assertions.assertEquals("rgvtqag", model.location()); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NspAccessRulePropertiesSubscriptionsItemTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NspAccessRulePropertiesSubscriptionsItemTests.java new file mode 100644 index 000000000000..4d3dc1e0a87f --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NspAccessRulePropertiesSubscriptionsItemTests.java @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.botservice.models.NspAccessRulePropertiesSubscriptionsItem; +import org.junit.jupiter.api.Assertions; + +public final class NspAccessRulePropertiesSubscriptionsItemTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NspAccessRulePropertiesSubscriptionsItem model = BinaryData.fromString("{\"id\":\"uzycispnqza\"}") + .toObject(NspAccessRulePropertiesSubscriptionsItem.class); + Assertions.assertEquals("uzycispnqza", model.id()); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NspAccessRulePropertiesTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NspAccessRulePropertiesTests.java new file mode 100644 index 000000000000..aa190fb71bc7 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NspAccessRulePropertiesTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.botservice.models.NspAccessRuleDirection; +import com.azure.resourcemanager.botservice.models.NspAccessRuleProperties; +import org.junit.jupiter.api.Assertions; + +public final class NspAccessRulePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NspAccessRuleProperties model = BinaryData.fromString( + "{\"direction\":\"Outbound\",\"addressPrefixes\":[\"koklya\"],\"subscriptions\":[{\"id\":\"nuqszfkbey\"},{\"id\":\"wrmjmwvvjektc\"},{\"id\":\"enhwlrs\"},{\"id\":\"rzpwvlqdqgbiq\"}],\"networkSecurityPerimeters\":[{\"id\":\"kaet\",\"perimeterGuid\":\"tvfcivfsn\",\"location\":\"m\"},{\"id\":\"tqhjfbebrjcx\",\"perimeterGuid\":\"fuwutttxf\",\"location\":\"rbirphxe\"},{\"id\":\"yva\",\"perimeterGuid\":\"nljky\",\"location\":\"j\"}],\"fullyQualifiedDomainNames\":[\"j\",\"gidokgjljyoxgvcl\"],\"emailAddresses\":[\"sncghkjeszz\",\"bijhtxfvgxbf\",\"mxnehmp\"],\"phoneNumbers\":[\"xgodebfqkkrbmp\",\"kgriwflzlfbx\"]}") + .toObject(NspAccessRuleProperties.class); + Assertions.assertEquals(NspAccessRuleDirection.OUTBOUND, model.direction()); + Assertions.assertEquals("koklya", model.addressPrefixes().get(0)); + Assertions.assertEquals("nuqszfkbey", model.subscriptions().get(0).id()); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NspAccessRuleTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NspAccessRuleTests.java new file mode 100644 index 000000000000..17a850971d84 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/NspAccessRuleTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.botservice.models.NspAccessRule; +import org.junit.jupiter.api.Assertions; + +public final class NspAccessRuleTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + NspAccessRule model = BinaryData.fromString( + "{\"name\":\"hxmzsbbzoggig\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"vjxxjnsp\"],\"subscriptions\":[{\"id\":\"koen\"},{\"id\":\"uknvudwti\"},{\"id\":\"bldngkpoc\"}],\"networkSecurityPerimeters\":[{\"id\":\"yxoegukgjnp\",\"perimeterGuid\":\"cgygev\",\"location\":\"ntypmrbpizcdrqj\"},{\"id\":\"pyd\",\"perimeterGuid\":\"yhxdeoejzicwi\",\"location\":\"jttgzf\"},{\"id\":\"shcbkhajdeyeamdp\",\"perimeterGuid\":\"g\",\"location\":\"pbuxwgipwhon\"}],\"fullyQualifiedDomainNames\":[\"gshwankixz\",\"injep\"],\"emailAddresses\":[\"mryw\",\"uzoqft\"],\"phoneNumbers\":[\"zrnkcqvyxlwh\",\"lsicohoqqnwv\",\"ryavwhheunmmqh\",\"yxzk\"]}}") + .toObject(NspAccessRule.class); + Assertions.assertEquals("hxmzsbbzoggig", model.name()); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/OmnichannelTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/OmnichannelTests.java index 2b8e8cb9185d..c3182154390d 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/OmnichannelTests.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/OmnichannelTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -12,17 +12,17 @@ public final class OmnichannelTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { Omnichannel model = BinaryData.fromString( - "{\"channelName\":\"Omnichannel\",\"etag\":\"rmfqjhhkxbpvj\",\"provisioningState\":\"jhxxjyn\",\"location\":\"divkrt\"}") + "{\"channelName\":\"Omnichannel\",\"etag\":\"znqntoru\",\"provisioningState\":\"gsahmkycgrauw\",\"location\":\"etaebu\"}") .toObject(Omnichannel.class); - Assertions.assertEquals("rmfqjhhkxbpvj", model.etag()); - Assertions.assertEquals("divkrt", model.location()); + Assertions.assertEquals("znqntoru", model.etag()); + Assertions.assertEquals("etaebu", model.location()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - Omnichannel model = new Omnichannel().withEtag("rmfqjhhkxbpvj").withLocation("divkrt"); + Omnichannel model = new Omnichannel().withEtag("znqntoru").withLocation("etaebu"); model = BinaryData.fromObject(model).toObject(Omnichannel.class); - Assertions.assertEquals("rmfqjhhkxbpvj", model.etag()); - Assertions.assertEquals("divkrt", model.location()); + Assertions.assertEquals("znqntoru", model.etag()); + Assertions.assertEquals("etaebu", model.location()); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/OperationDisplayInfoTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/OperationDisplayInfoTests.java index 17a7c7626dba..2b0984cc2bb7 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/OperationDisplayInfoTests.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/OperationDisplayInfoTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -12,24 +12,11 @@ public final class OperationDisplayInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationDisplayInfo model = BinaryData.fromString( - "{\"description\":\"chcbonqvpkvlrxnj\",\"operation\":\"seiphe\",\"provider\":\"lokeyy\",\"resource\":\"nj\"}") + "{\"description\":\"rcryuanzwuxzdxta\",\"operation\":\"lhmwhfpmrqobm\",\"provider\":\"kknryrtihf\",\"resource\":\"ijbpzvgnwzsymgl\"}") .toObject(OperationDisplayInfo.class); - Assertions.assertEquals("chcbonqvpkvlrxnj", model.description()); - Assertions.assertEquals("seiphe", model.operation()); - Assertions.assertEquals("lokeyy", model.provider()); - Assertions.assertEquals("nj", model.resource()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplayInfo model = new OperationDisplayInfo().withDescription("chcbonqvpkvlrxnj") - .withOperation("seiphe") - .withProvider("lokeyy") - .withResource("nj"); - model = BinaryData.fromObject(model).toObject(OperationDisplayInfo.class); - Assertions.assertEquals("chcbonqvpkvlrxnj", model.description()); - Assertions.assertEquals("seiphe", model.operation()); - Assertions.assertEquals("lokeyy", model.provider()); - Assertions.assertEquals("nj", model.resource()); + Assertions.assertEquals("rcryuanzwuxzdxta", model.description()); + Assertions.assertEquals("lhmwhfpmrqobm", model.operation()); + Assertions.assertEquals("kknryrtihf", model.provider()); + Assertions.assertEquals("ijbpzvgnwzsymgl", model.resource()); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/OperationEntityInnerTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/OperationEntityInnerTests.java index 180a2d38f264..4544027cd5b2 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/OperationEntityInnerTests.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/OperationEntityInnerTests.java @@ -1,43 +1,24 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.botservice.fluent.models.OperationEntityInner; -import com.azure.resourcemanager.botservice.models.OperationDisplayInfo; import org.junit.jupiter.api.Assertions; public final class OperationEntityInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationEntityInner model = BinaryData.fromString( - "{\"name\":\"mivkwlzuvcc\",\"display\":{\"description\":\"fnba\",\"operation\":\"ionle\",\"provider\":\"etqgtzxdpnq\",\"resource\":\"qwxrjfeallnw\"},\"origin\":\"bisnja\",\"properties\":\"datamngnzscxaqw\"}") + "{\"name\":\"cmpoyfdkfogkny\",\"display\":{\"description\":\"fjddeqs\",\"operation\":\"eupewnwreitjz\",\"provider\":\"lusarh\",\"resource\":\"fcqhsmyurkd\"},\"origin\":\"lx\",\"properties\":\"\\\"datakuksjtxukcdm\\\"\"}") .toObject(OperationEntityInner.class); - Assertions.assertEquals("mivkwlzuvcc", model.name()); - Assertions.assertEquals("fnba", model.display().description()); - Assertions.assertEquals("ionle", model.display().operation()); - Assertions.assertEquals("etqgtzxdpnq", model.display().provider()); - Assertions.assertEquals("qwxrjfeallnw", model.display().resource()); - Assertions.assertEquals("bisnja", model.origin()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationEntityInner model = new OperationEntityInner().withName("mivkwlzuvcc") - .withDisplay(new OperationDisplayInfo().withDescription("fnba") - .withOperation("ionle") - .withProvider("etqgtzxdpnq") - .withResource("qwxrjfeallnw")) - .withOrigin("bisnja") - .withProperties("datamngnzscxaqw"); - model = BinaryData.fromObject(model).toObject(OperationEntityInner.class); - Assertions.assertEquals("mivkwlzuvcc", model.name()); - Assertions.assertEquals("fnba", model.display().description()); - Assertions.assertEquals("ionle", model.display().operation()); - Assertions.assertEquals("etqgtzxdpnq", model.display().provider()); - Assertions.assertEquals("qwxrjfeallnw", model.display().resource()); - Assertions.assertEquals("bisnja", model.origin()); + Assertions.assertEquals("cmpoyfdkfogkny", model.name()); + Assertions.assertEquals("fjddeqs", model.display().description()); + Assertions.assertEquals("eupewnwreitjz", model.display().operation()); + Assertions.assertEquals("lusarh", model.display().provider()); + Assertions.assertEquals("fcqhsmyurkd", model.display().resource()); + Assertions.assertEquals("lx", model.origin()); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/OperationEntityListResultTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/OperationEntityListResultTests.java index 60c061930592..e42d660bb8d1 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/OperationEntityListResultTests.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/OperationEntityListResultTests.java @@ -1,48 +1,25 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.botservice.fluent.models.OperationEntityInner; -import com.azure.resourcemanager.botservice.models.OperationDisplayInfo; -import com.azure.resourcemanager.botservice.models.OperationEntityListResult; -import java.util.Arrays; +import com.azure.resourcemanager.botservice.implementation.models.OperationEntityListResult; import org.junit.jupiter.api.Assertions; public final class OperationEntityListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationEntityListResult model = BinaryData.fromString( - "{\"nextLink\":\"qdrabhjybigehoqf\",\"value\":[{\"name\":\"kanyktzlcuiywg\",\"display\":{\"description\":\"gndrvynh\",\"operation\":\"pphrcgynco\",\"provider\":\"ecfvmm\",\"resource\":\"ofsx\"},\"origin\":\"evgbmqjq\",\"properties\":\"datac\"}]}") + "{\"nextLink\":\"mhquvgjxp\",\"value\":[{\"name\":\"zm\",\"display\":{\"description\":\"tzopbsphrupidgsy\",\"operation\":\"ejhphoyc\",\"provider\":\"xaobhdxbmtqioqjz\",\"resource\":\"tbmufpo\"},\"origin\":\"oizh\",\"properties\":\"\\\"datarxybqsoq\\\"\"},{\"name\":\"gkdmb\",\"display\":{\"description\":\"lobcufpdznrbtcq\",\"operation\":\"nq\",\"provider\":\"hqgnufooojywif\",\"resource\":\"esaagdfm\"},\"origin\":\"zlhjxrifkwmrvkt\",\"properties\":\"\\\"datazntocipaouajps\\\"\"}]}") .toObject(OperationEntityListResult.class); - Assertions.assertEquals("qdrabhjybigehoqf", model.nextLink()); - Assertions.assertEquals("kanyktzlcuiywg", model.value().get(0).name()); - Assertions.assertEquals("gndrvynh", model.value().get(0).display().description()); - Assertions.assertEquals("pphrcgynco", model.value().get(0).display().operation()); - Assertions.assertEquals("ecfvmm", model.value().get(0).display().provider()); - Assertions.assertEquals("ofsx", model.value().get(0).display().resource()); - Assertions.assertEquals("evgbmqjq", model.value().get(0).origin()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationEntityListResult model = new OperationEntityListResult().withNextLink("qdrabhjybigehoqf") - .withValue(Arrays.asList(new OperationEntityInner().withName("kanyktzlcuiywg") - .withDisplay(new OperationDisplayInfo().withDescription("gndrvynh") - .withOperation("pphrcgynco") - .withProvider("ecfvmm") - .withResource("ofsx")) - .withOrigin("evgbmqjq") - .withProperties("datac"))); - model = BinaryData.fromObject(model).toObject(OperationEntityListResult.class); - Assertions.assertEquals("qdrabhjybigehoqf", model.nextLink()); - Assertions.assertEquals("kanyktzlcuiywg", model.value().get(0).name()); - Assertions.assertEquals("gndrvynh", model.value().get(0).display().description()); - Assertions.assertEquals("pphrcgynco", model.value().get(0).display().operation()); - Assertions.assertEquals("ecfvmm", model.value().get(0).display().provider()); - Assertions.assertEquals("ofsx", model.value().get(0).display().resource()); - Assertions.assertEquals("evgbmqjq", model.value().get(0).origin()); + Assertions.assertEquals("mhquvgjxp", model.nextLink()); + Assertions.assertEquals("zm", model.value().get(0).name()); + Assertions.assertEquals("tzopbsphrupidgsy", model.value().get(0).display().description()); + Assertions.assertEquals("ejhphoyc", model.value().get(0).display().operation()); + Assertions.assertEquals("xaobhdxbmtqioqjz", model.value().get(0).display().provider()); + Assertions.assertEquals("tbmufpo", model.value().get(0).display().resource()); + Assertions.assertEquals("oizh", model.value().get(0).origin()); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/OperationResultsDescriptionInnerTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/OperationResultsDescriptionInnerTests.java new file mode 100644 index 000000000000..c47fa5e137ce --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/OperationResultsDescriptionInnerTests.java @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.botservice.fluent.models.OperationResultsDescriptionInner; + +public final class OperationResultsDescriptionInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + OperationResultsDescriptionInner model = BinaryData.fromString( + "{\"id\":\"ijejvegrhbpn\",\"name\":\"xexccbdreaxhcexd\",\"status\":\"Running\",\"startTime\":\"2021-02-20T02:30:52Z\"}") + .toObject(OperationResultsDescriptionInner.class); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/OperationsListMockTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/OperationsListMockTests.java index a96a7caaf414..80ea26ae1187 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/OperationsListMockTests.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/OperationsListMockTests.java @@ -1,14 +1,14 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; import com.azure.core.credential.AccessToken; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.botservice.BotServiceManager; import com.azure.resourcemanager.botservice.models.OperationEntity; @@ -22,22 +22,22 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"racstwity\",\"display\":{\"description\":\"vxccedcp\",\"operation\":\"dyodnwzxltj\",\"provider\":\"nhltiugcxn\",\"resource\":\"vwxqibyqunyo\"},\"origin\":\"wlmdjrkv\",\"properties\":\"databvfvpdbod\"}]}"; + = "{\"value\":[{\"name\":\"qkghtpwijnhy\",\"display\":{\"description\":\"f\",\"operation\":\"xzb\",\"provider\":\"oowvrv\",\"resource\":\"gjqppy\"},\"origin\":\"tronzmyhgfi\",\"properties\":\"\\\"datasxkm\\\"\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); BotServiceManager manager = BotServiceManager.configure() .withHttpClient(httpClient) .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - Assertions.assertEquals("racstwity", response.iterator().next().name()); - Assertions.assertEquals("vxccedcp", response.iterator().next().display().description()); - Assertions.assertEquals("dyodnwzxltj", response.iterator().next().display().operation()); - Assertions.assertEquals("nhltiugcxn", response.iterator().next().display().provider()); - Assertions.assertEquals("vwxqibyqunyo", response.iterator().next().display().resource()); - Assertions.assertEquals("wlmdjrkv", response.iterator().next().origin()); + Assertions.assertEquals("qkghtpwijnhy", response.iterator().next().name()); + Assertions.assertEquals("f", response.iterator().next().display().description()); + Assertions.assertEquals("xzb", response.iterator().next().display().operation()); + Assertions.assertEquals("oowvrv", response.iterator().next().display().provider()); + Assertions.assertEquals("gjqppy", response.iterator().next().display().resource()); + Assertions.assertEquals("tronzmyhgfi", response.iterator().next().origin()); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/OutlookChannelTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/OutlookChannelTests.java index 037825378ba7..da22235aa0c5 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/OutlookChannelTests.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/OutlookChannelTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -12,17 +12,17 @@ public final class OutlookChannelTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OutlookChannel model = BinaryData.fromString( - "{\"channelName\":\"OutlookChannel\",\"etag\":\"afkuwb\",\"provisioningState\":\"nwbmeh\",\"location\":\"eyvjusrtslhspkde\"}") + "{\"channelName\":\"OutlookChannel\",\"etag\":\"queziky\",\"provisioningState\":\"gxk\",\"location\":\"la\"}") .toObject(OutlookChannel.class); - Assertions.assertEquals("afkuwb", model.etag()); - Assertions.assertEquals("eyvjusrtslhspkde", model.location()); + Assertions.assertEquals("queziky", model.etag()); + Assertions.assertEquals("la", model.location()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - OutlookChannel model = new OutlookChannel().withEtag("afkuwb").withLocation("eyvjusrtslhspkde"); + OutlookChannel model = new OutlookChannel().withEtag("queziky").withLocation("la"); model = BinaryData.fromObject(model).toObject(OutlookChannel.class); - Assertions.assertEquals("afkuwb", model.etag()); - Assertions.assertEquals("eyvjusrtslhspkde", model.location()); + Assertions.assertEquals("queziky", model.etag()); + Assertions.assertEquals("la", model.location()); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionInnerTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionInnerTests.java new file mode 100644 index 000000000000..10555adf9f7f --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionInnerTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.botservice.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.botservice.models.PrivateEndpoint; +import com.azure.resourcemanager.botservice.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.botservice.models.PrivateLinkServiceConnectionState; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class PrivateEndpointConnectionInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateEndpointConnectionInner model = BinaryData.fromString( + "{\"properties\":{\"privateEndpoint\":{\"id\":\"sqrglssainq\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"zlljfmppeebvm\",\"actionsRequired\":\"sabkyqduujitcjcz\"},\"provisioningState\":\"Creating\",\"groupIds\":[\"dhkrwpdappdsbdk\",\"wrwjfeu\"]},\"id\":\"hutje\",\"name\":\"tmrldhugjzzdatq\",\"type\":\"hocdgeab\"}") + .toObject(PrivateEndpointConnectionInner.class); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, + model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("zlljfmppeebvm", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("sabkyqduujitcjcz", model.privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("dhkrwpdappdsbdk", model.groupIds().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateEndpointConnectionInner model + = new PrivateEndpointConnectionInner().withPrivateEndpoint(new PrivateEndpoint()) + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) + .withDescription("zlljfmppeebvm") + .withActionsRequired("sabkyqduujitcjcz")) + .withGroupIds(Arrays.asList("dhkrwpdappdsbdk", "wrwjfeu")); + model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionInner.class); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, + model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("zlljfmppeebvm", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("sabkyqduujitcjcz", model.privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("dhkrwpdappdsbdk", model.groupIds().get(0)); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionListResultTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionListResultTests.java new file mode 100644 index 000000000000..91f698fb863a --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionListResultTests.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.botservice.implementation.models.PrivateEndpointConnectionListResult; +import com.azure.resourcemanager.botservice.models.PrivateEndpointServiceConnectionStatus; +import org.junit.jupiter.api.Assertions; + +public final class PrivateEndpointConnectionListResultTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateEndpointConnectionListResult model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"fqbuaceopzf\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"uaopppcqeq\",\"actionsRequired\":\"lzdahzxctobgbkdm\"},\"provisioningState\":\"Deleting\",\"groupIds\":[\"stmgrcfbunrmfqjh\",\"kxbpvj\"]},\"id\":\"jhxxjyn\",\"name\":\"u\",\"type\":\"ivkrtsw\"}],\"nextLink\":\"qzvszjf\"}") + .toObject(PrivateEndpointConnectionListResult.class); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, + model.value().get(0).privateLinkServiceConnectionState().status()); + Assertions.assertEquals("uaopppcqeq", model.value().get(0).privateLinkServiceConnectionState().description()); + Assertions.assertEquals("lzdahzxctobgbkdm", + model.value().get(0).privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("stmgrcfbunrmfqjh", model.value().get(0).groupIds().get(0)); + Assertions.assertEquals("qzvszjf", model.nextLink()); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionPropertiesTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionPropertiesTests.java new file mode 100644 index 000000000000..8d1cbec18ad7 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionPropertiesTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.botservice.fluent.models.PrivateEndpointConnectionProperties; +import com.azure.resourcemanager.botservice.models.PrivateEndpoint; +import com.azure.resourcemanager.botservice.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.botservice.models.PrivateLinkServiceConnectionState; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class PrivateEndpointConnectionPropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateEndpointConnectionProperties model = BinaryData.fromString( + "{\"privateEndpoint\":{\"id\":\"huticndvkao\"},\"privateLinkServiceConnectionState\":{\"status\":\"Rejected\",\"description\":\"ftyhxhurokf\",\"actionsRequired\":\"xolniwpwcukjfk\"},\"provisioningState\":\"Creating\",\"groupIds\":[\"klryplwck\",\"asy\"]}") + .toObject(PrivateEndpointConnectionProperties.class); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, + model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("ftyhxhurokf", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("xolniwpwcukjfk", model.privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("klryplwck", model.groupIds().get(0)); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateEndpointConnectionProperties model + = new PrivateEndpointConnectionProperties().withPrivateEndpoint(new PrivateEndpoint()) + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.REJECTED) + .withDescription("ftyhxhurokf") + .withActionsRequired("xolniwpwcukjfk")) + .withGroupIds(Arrays.asList("klryplwck", "asy")); + model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, + model.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("ftyhxhurokf", model.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("xolniwpwcukjfk", model.privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("klryplwck", model.groupIds().get(0)); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsCreateWithResponseMockTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsCreateWithResponseMockTests.java new file mode 100644 index 000000000000..86d6e8d0f9d4 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsCreateWithResponseMockTests.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.botservice.BotServiceManager; +import com.azure.resourcemanager.botservice.models.PrivateEndpoint; +import com.azure.resourcemanager.botservice.models.PrivateEndpointConnection; +import com.azure.resourcemanager.botservice.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.botservice.models.PrivateLinkServiceConnectionState; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class PrivateEndpointConnectionsCreateWithResponseMockTests { + @Test + public void testCreateWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"privateEndpoint\":{\"id\":\"kfm\"},\"privateLinkServiceConnectionState\":{\"status\":\"Approved\",\"description\":\"owzfttsttkt\",\"actionsRequired\":\"hbq\"},\"provisioningState\":\"Succeeded\",\"groupIds\":[\"gzukxitmm\",\"tg\",\"qqxhrnxrxcpj\"]},\"id\":\"savokqdzf\",\"name\":\"azivjlfrqttbajl\",\"type\":\"atnwxyiopi\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + BotServiceManager manager = BotServiceManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PrivateEndpointConnection response = manager.privateEndpointConnections() + .define("nszqujiz") + .withExistingBotService("smiccwrwfscj", "n") + .withPrivateEndpoint(new PrivateEndpoint()) + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) + .withDescription("yavutpthjoxois") + .withActionsRequired("ksbpimlqoljx")) + .withGroupIds(Arrays.asList("lxsffg")) + .create(); + + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.APPROVED, + response.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("owzfttsttkt", response.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("hbq", response.privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("gzukxitmm", response.groupIds().get(0)); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsDeleteWithResponseMockTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsDeleteWithResponseMockTests.java new file mode 100644 index 000000000000..649e0a204905 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsDeleteWithResponseMockTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.botservice.BotServiceManager; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class PrivateEndpointConnectionsDeleteWithResponseMockTests { + @Test + public void testDeleteWithResponse() throws Exception { + String responseStr = "{}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + BotServiceManager manager = BotServiceManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + manager.privateEndpointConnections() + .deleteWithResponse("rxgibbd", "xconfozauors", "kokwbqplhlvnu", com.azure.core.util.Context.NONE); + + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java new file mode 100644 index 000000000000..0129203cc57a --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.botservice.BotServiceManager; +import com.azure.resourcemanager.botservice.models.PrivateEndpointConnection; +import com.azure.resourcemanager.botservice.models.PrivateEndpointServiceConnectionStatus; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class PrivateEndpointConnectionsGetWithResponseMockTests { + @Test + public void testGetWithResponse() throws Exception { + String responseStr + = "{\"properties\":{\"privateEndpoint\":{\"id\":\"adraufactkahzo\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"ziuxxpshnee\",\"actionsRequired\":\"lfg\"},\"provisioningState\":\"Creating\",\"groupIds\":[\"kwdlenrdsutujba\",\"pjuohminyfl\",\"orwmduvwpklv\"]},\"id\":\"mygdxpgpqch\",\"name\":\"sze\",\"type\":\"nnbj\"}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + BotServiceManager manager = BotServiceManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PrivateEndpointConnection response = manager.privateEndpointConnections() + .getWithResponse("vvhmxtdrj", "utacoe", "jvewzcjznmwcp", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, + response.privateLinkServiceConnectionState().status()); + Assertions.assertEquals("ziuxxpshnee", response.privateLinkServiceConnectionState().description()); + Assertions.assertEquals("lfg", response.privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("kwdlenrdsutujba", response.groupIds().get(0)); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsListMockTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsListMockTests.java new file mode 100644 index 000000000000..7dc430435b0e --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointConnectionsListMockTests.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.botservice.BotServiceManager; +import com.azure.resourcemanager.botservice.models.PrivateEndpointConnection; +import com.azure.resourcemanager.botservice.models.PrivateEndpointServiceConnectionStatus; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class PrivateEndpointConnectionsListMockTests { + @Test + public void testList() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"nrwrbiork\"},\"privateLinkServiceConnectionState\":{\"status\":\"Pending\",\"description\":\"wjhhgdnhxmsivf\",\"actionsRequired\":\"iloxggdufiq\"},\"provisioningState\":\"Failed\",\"groupIds\":[\"zaofjchvcyy\",\"s\",\"gdotcubiipuipwo\",\"onmacjekniz\"]},\"id\":\"qvci\",\"name\":\"pevf\",\"type\":\"mblrrilbywd\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + BotServiceManager manager = BotServiceManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PagedIterable response + = manager.privateEndpointConnections().list("epzl", "phwzsoldweyuqdu", com.azure.core.util.Context.NONE); + + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, + response.iterator().next().privateLinkServiceConnectionState().status()); + Assertions.assertEquals("wjhhgdnhxmsivf", + response.iterator().next().privateLinkServiceConnectionState().description()); + Assertions.assertEquals("iloxggdufiq", + response.iterator().next().privateLinkServiceConnectionState().actionsRequired()); + Assertions.assertEquals("zaofjchvcyy", response.iterator().next().groupIds().get(0)); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointTests.java new file mode 100644 index 000000000000..00b0031aa423 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateEndpointTests.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.botservice.models.PrivateEndpoint; + +public final class PrivateEndpointTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateEndpoint model = BinaryData.fromString("{\"id\":\"nddhsgcbacph\"}").toObject(PrivateEndpoint.class); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateEndpoint model = new PrivateEndpoint(); + model = BinaryData.fromObject(model).toObject(PrivateEndpoint.class); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateLinkResourceBaseTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateLinkResourceBaseTests.java new file mode 100644 index 000000000000..4ffc857ddb7d --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateLinkResourceBaseTests.java @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.botservice.models.PrivateLinkResourceBase; + +public final class PrivateLinkResourceBaseTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateLinkResourceBase model = BinaryData.fromString("{\"id\":\"v\",\"name\":\"jqg\",\"type\":\"smocmbq\"}") + .toObject(PrivateLinkResourceBase.class); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateLinkResourceListResultInnerTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateLinkResourceListResultInnerTests.java new file mode 100644 index 000000000000..2bbdeaeaf1ba --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateLinkResourceListResultInnerTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.botservice.fluent.models.PrivateLinkResourceListResultInner; +import org.junit.jupiter.api.Assertions; + +public final class PrivateLinkResourceListResultInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateLinkResourceListResultInner model = BinaryData.fromString( + "{\"value\":[{\"properties\":{\"groupId\":\"mubyynt\",\"requiredMembers\":[\"bqtkoievseotgqr\",\"ltmuwlauwzizx\"],\"requiredZoneNames\":[\"gcj\",\"fuzmuvpbtt\",\"um\"]},\"id\":\"p\",\"name\":\"ebmnzbtbhjpglk\",\"type\":\"ohdneuel\"},{\"properties\":{\"groupId\":\"sdyhtozfikdowwq\",\"requiredMembers\":[\"xzxcl\"],\"requiredZoneNames\":[\"hhqzonosgg\",\"hcohfwdsjnk\",\"ljuti\",\"swacffgdkzz\"]},\"id\":\"kfvhqcrailvpn\",\"name\":\"fuflrwdmhdlx\",\"type\":\"rxsagafcnihgwqa\"},{\"properties\":{\"groupId\":\"dgfbcvkcvqvpke\",\"requiredMembers\":[\"vdrhvoo\",\"sotbob\",\"dopcjwvnh\"],\"requiredZoneNames\":[\"wmgxcxrsl\"]},\"id\":\"utwu\",\"name\":\"grpkhjwniyqs\",\"type\":\"i\"}]}") + .toObject(PrivateLinkResourceListResultInner.class); + Assertions.assertEquals("gcj", model.value().get(0).requiredZoneNames().get(0)); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateLinkResourcePropertiesTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateLinkResourcePropertiesTests.java new file mode 100644 index 000000000000..67c2710be475 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateLinkResourcePropertiesTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.botservice.fluent.models.PrivateLinkResourceProperties; +import org.junit.jupiter.api.Assertions; + +public final class PrivateLinkResourcePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateLinkResourceProperties model = BinaryData.fromString( + "{\"groupId\":\"vmkcx\",\"requiredMembers\":[\"pvhelxprg\",\"yat\",\"dckcbc\"],\"requiredZoneNames\":[\"rjxgciqib\",\"hos\",\"sdqrhzoymibmrq\",\"ibahwflus\"]}") + .toObject(PrivateLinkResourceProperties.class); + Assertions.assertEquals("rjxgciqib", model.requiredZoneNames().get(0)); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateLinkResourceTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateLinkResourceTests.java new file mode 100644 index 000000000000..68ab29f3fff4 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateLinkResourceTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.botservice.models.PrivateLinkResource; +import org.junit.jupiter.api.Assertions; + +public final class PrivateLinkResourceTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateLinkResource model = BinaryData.fromString( + "{\"properties\":{\"groupId\":\"ggkzzlvmbmpa\",\"requiredMembers\":[\"dfvue\",\"yw\",\"bpfvm\"],\"requiredZoneNames\":[\"rfouyftaakcpw\",\"yzvqt\"]},\"id\":\"ubex\",\"name\":\"zksmondj\",\"type\":\"uxvypomgkopkwh\"}") + .toObject(PrivateLinkResource.class); + Assertions.assertEquals("rfouyftaakcpw", model.requiredZoneNames().get(0)); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateLinkResourcesListByBotResourceWithResponseMockTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateLinkResourcesListByBotResourceWithResponseMockTests.java new file mode 100644 index 000000000000..23a316a16a6f --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateLinkResourcesListByBotResourceWithResponseMockTests.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +import com.azure.core.credential.AccessToken; +import com.azure.core.http.HttpClient; +import com.azure.core.management.profile.AzureProfile; +import com.azure.core.models.AzureCloud; +import com.azure.core.test.http.MockHttpResponse; +import com.azure.resourcemanager.botservice.BotServiceManager; +import com.azure.resourcemanager.botservice.models.PrivateLinkResourceListResult; +import java.nio.charset.StandardCharsets; +import java.time.OffsetDateTime; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +public final class PrivateLinkResourcesListByBotResourceWithResponseMockTests { + @Test + public void testListByBotResourceWithResponse() throws Exception { + String responseStr + = "{\"value\":[{\"properties\":{\"groupId\":\"agr\",\"requiredMembers\":[\"kteusqczk\",\"yklxubyjaffmmfbl\",\"qcuubgqibrta\",\"metttwgd\"],\"requiredZoneNames\":[\"xih\",\"rmooizqse\",\"pxiutc\"]},\"id\":\"pzhyr\",\"name\":\"togebjoxsl\",\"type\":\"nhl\"},{\"properties\":{\"groupId\":\"q\",\"requiredMembers\":[\"zjcjbtr\",\"aehvvibrxjjstoq\",\"eitpkxztmo\"],\"requiredZoneNames\":[\"lftidgfcwqmpim\"]},\"id\":\"xzhemjyh\",\"name\":\"uj\",\"type\":\"t\"},{\"properties\":{\"groupId\":\"zzwc\",\"requiredMembers\":[\"bawpfajnjwltlwt\"],\"requiredZoneNames\":[\"uktalhsnvkcdmxz\"]},\"id\":\"oaimlnw\",\"name\":\"aomylwea\",\"type\":\"lcsethwwnpj\"},{\"properties\":{\"groupId\":\"zswpchwa\",\"requiredMembers\":[\"ousnfepgfewe\",\"wlyxgncxyk\"],\"requiredZoneNames\":[\"jhlimmbcxfhbcpo\",\"xvxcjzhq\"]},\"id\":\"xfpxtgqscja\",\"name\":\"t\",\"type\":\"hdqazkmtgguwp\"}]}"; + + HttpClient httpClient + = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); + BotServiceManager manager = BotServiceManager.configure() + .withHttpClient(httpClient) + .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), + new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); + + PrivateLinkResourceListResult response = manager.privateLinkResources() + .listByBotResourceWithResponse("ouwifzmpjw", "ivqikfxcvhr", com.azure.core.util.Context.NONE) + .getValue(); + + Assertions.assertEquals("xih", response.value().get(0).requiredZoneNames().get(0)); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateLinkServiceConnectionStateTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateLinkServiceConnectionStateTests.java new file mode 100644 index 000000000000..b8718fc50ae7 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/PrivateLinkServiceConnectionStateTests.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.botservice.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.botservice.models.PrivateLinkServiceConnectionState; +import org.junit.jupiter.api.Assertions; + +public final class PrivateLinkServiceConnectionStateTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + PrivateLinkServiceConnectionState model = BinaryData + .fromString("{\"status\":\"Pending\",\"description\":\"tynqgoul\",\"actionsRequired\":\"dlikwyqkgfgibma\"}") + .toObject(PrivateLinkServiceConnectionState.class); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, model.status()); + Assertions.assertEquals("tynqgoul", model.description()); + Assertions.assertEquals("dlikwyqkgfgibma", model.actionsRequired()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + PrivateLinkServiceConnectionState model + = new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.PENDING) + .withDescription("tynqgoul") + .withActionsRequired("dlikwyqkgfgibma"); + model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class); + Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.PENDING, model.status()); + Assertions.assertEquals("tynqgoul", model.description()); + Assertions.assertEquals("dlikwyqkgfgibma", model.actionsRequired()); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ProfileTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ProfileTests.java new file mode 100644 index 000000000000..61dce0cd1ae8 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ProfileTests.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.botservice.models.Profile; +import org.junit.jupiter.api.Assertions; + +public final class ProfileTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + Profile model = BinaryData.fromString( + "{\"name\":\"fsiarbutr\",\"accessRulesVersion\":6344517989132203623,\"accessRules\":[{\"name\":\"mhjrunmpxttdbhr\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"xmyskp\"],\"subscriptions\":[{\"id\":\"btkcxywnytnrsyn\"},{\"id\":\"idybyxczf\"},{\"id\":\"haaxdbabphl\"}],\"networkSecurityPerimeters\":[{\"id\":\"fkts\",\"perimeterGuid\":\"sucocmnyyazttbtw\",\"location\":\"qpuedckzywbiex\"},{\"id\":\"eyueaxibxujwb\",\"perimeterGuid\":\"walm\",\"location\":\"yoxa\"},{\"id\":\"dkzjancuxrh\",\"perimeterGuid\":\"bavxbniwdjswzt\",\"location\":\"bpg\"}],\"fullyQualifiedDomainNames\":[\"txhp\",\"xbzpfzab\"],\"emailAddresses\":[\"uhxwtctyqiklbbov\"],\"phoneNumbers\":[\"zbhvgyuguosv\",\"kfssxqukkf\",\"l\"]}},{\"name\":\"gsxnkjzkdeslpv\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"ighxpk\",\"wzbaiue\"],\"subscriptions\":[{\"id\":\"m\"}],\"networkSecurityPerimeters\":[{\"id\":\"ped\",\"perimeterGuid\":\"jn\",\"location\":\"ckhsmtxpsieb\"},{\"id\":\"hvpesapskrdqm\",\"perimeterGuid\":\"jdhtldwkyzxu\",\"location\":\"kn\"},{\"id\":\"scwsv\",\"perimeterGuid\":\"otogtwrupqs\",\"location\":\"nmic\"}],\"fullyQualifiedDomainNames\":[\"ceoveilovno\"],\"emailAddresses\":[\"jfcn\"],\"phoneNumbers\":[\"cn\"]}},{\"name\":\"hbttkphyw\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"qnermclfplphoxu\",\"crpab\",\"ye\"],\"subscriptions\":[{\"id\":\"tazqugxywpmueefj\"},{\"id\":\"fqkquj\"},{\"id\":\"suyonobglaocq\"},{\"id\":\"ccm\"}],\"networkSecurityPerimeters\":[{\"id\":\"xy\",\"perimeterGuid\":\"moyrxvwfudwpz\",\"location\":\"xhdzhlrqjbhckf\"},{\"id\":\"hrxsbk\",\"perimeterGuid\":\"pycanuzbpz\",\"location\":\"fkuwbcrnwbmehhse\"},{\"id\":\"jusrtslhspk\",\"perimeterGuid\":\"emaofmxagkvt\",\"location\":\"lmqkrhahvlj\"}],\"fullyQualifiedDomainNames\":[\"aquhcdhm\",\"ualaexqpvfadmw\"],\"emailAddresses\":[\"r\",\"vxpvgomz\",\"fmisg\"],\"phoneNumbers\":[\"b\",\"e\"]}},{\"name\":\"awkz\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"rqhakauha\",\"hsfwxosowzxcug\"],\"subscriptions\":[{\"id\":\"oxdjebwpuc\"},{\"id\":\"fvovbvmeuecivy\"},{\"id\":\"ce\"}],\"networkSecurityPerimeters\":[{\"id\":\"jrwjueiotwm\",\"perimeterGuid\":\"ytdxwit\",\"location\":\"rjaw\"},{\"id\":\"wgxhn\",\"perimeterGuid\":\"kxfbkpycgklwndn\",\"location\":\"dauwhvylwzbtd\"},{\"id\":\"ujznb\",\"perimeterGuid\":\"ow\",\"location\":\"przqlveu\"},{\"id\":\"upjm\",\"perimeterGuid\":\"fxobbcsws\",\"location\":\"jriplrbpbewtghf\"}],\"fullyQualifiedDomainNames\":[\"c\",\"wxzvlvqhjkb\",\"gibtnm\"],\"emailAddresses\":[\"bwwaloa\",\"qcgw\",\"tzjuzgwyzmhtxo\"],\"phoneNumbers\":[\"ts\",\"vjcbpwxqpsrknf\",\"guvriuhprwmd\",\"vxqtayriwwroyqbe\"]}}],\"diagnosticSettingsVersion\":2541136734872017972,\"enabledLogCategories\":[\"bycnojvkn\",\"e\"]}") + .toObject(Profile.class); + Assertions.assertEquals("fsiarbutr", model.name()); + Assertions.assertEquals(6344517989132203623L, model.accessRulesVersion()); + Assertions.assertEquals("mhjrunmpxttdbhr", model.accessRules().get(0).name()); + Assertions.assertEquals(2541136734872017972L, model.diagnosticSettingsVersion()); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ProvisioningIssuePropertiesTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ProvisioningIssuePropertiesTests.java new file mode 100644 index 000000000000..218e55b49cb5 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ProvisioningIssuePropertiesTests.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.botservice.models.ProvisioningIssueProperties; +import com.azure.resourcemanager.botservice.models.Severity; +import org.junit.jupiter.api.Assertions; + +public final class ProvisioningIssuePropertiesTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ProvisioningIssueProperties model = BinaryData.fromString( + "{\"issueType\":\"q\",\"severity\":\"Error\",\"description\":\"ureximoryocfs\",\"suggestedResourceIds\":[\"ymddys\"],\"suggestedAccessRules\":[{\"name\":\"uxh\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"rrqnbpoczvyifqrv\"],\"subscriptions\":[{\"id\":\"sllr\"},{\"id\":\"vdfwatkpn\"},{\"id\":\"lexxbczwtru\"}],\"networkSecurityPerimeters\":[{\"id\":\"bq\",\"perimeterGuid\":\"sovmyokacspkwl\",\"location\":\"dobpxjmflbvvn\"},{\"id\":\"rkcciwwzjuqk\",\"perimeterGuid\":\"sa\",\"location\":\"wkuofoskghsauu\"},{\"id\":\"jmvxie\",\"perimeterGuid\":\"ugidyjrr\",\"location\":\"y\"}],\"fullyQualifiedDomainNames\":[\"v\",\"xc\",\"onpc\",\"hocohslkev\"],\"emailAddresses\":[\"gz\",\"buhfmvfaxkffeiit\"],\"phoneNumbers\":[\"m\",\"zy\"]}}]}") + .toObject(ProvisioningIssueProperties.class); + Assertions.assertEquals("q", model.issueType()); + Assertions.assertEquals(Severity.ERROR, model.severity()); + Assertions.assertEquals("ureximoryocfs", model.description()); + Assertions.assertEquals("uxh", model.suggestedAccessRules().get(0).name()); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ProvisioningIssueTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ProvisioningIssueTests.java new file mode 100644 index 000000000000..4cc42397b03e --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ProvisioningIssueTests.java @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.botservice.models.ProvisioningIssue; +import org.junit.jupiter.api.Assertions; + +public final class ProvisioningIssueTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ProvisioningIssue model = BinaryData.fromString( + "{\"name\":\"alhbx\",\"properties\":{\"issueType\":\"jj\",\"severity\":\"Warning\",\"description\":\"udgwdslfho\",\"suggestedResourceIds\":[\"cynpwlbjnp\"],\"suggestedAccessRules\":[{\"name\":\"tadehxnltyfsopp\",\"properties\":{\"direction\":\"Inbound\",\"addressPrefixes\":[\"zwdejbavor\",\"zdmohctbqvu\"],\"subscriptions\":[{}],\"networkSecurityPerimeters\":[{},{}],\"fullyQualifiedDomainNames\":[\"vo\",\"gujjugwdkcglh\",\"lazjdyggdtjixhbk\"],\"emailAddresses\":[\"qweykhmenev\",\"yexfwh\",\"bcibvyvdcsitynn\"],\"phoneNumbers\":[\"dectehfiqsc\",\"eypvhezrkg\",\"hcjrefovgmk\",\"sle\"]}},{\"name\":\"vxyqjpkcattpngjc\",\"properties\":{\"direction\":\"Outbound\",\"addressPrefixes\":[\"pjhvmdajvnys\",\"unqecanoae\"],\"subscriptions\":[{},{},{},{}],\"networkSecurityPerimeters\":[{},{},{},{}],\"fullyQualifiedDomainNames\":[\"trpmo\",\"jmcmatuokthfu\"],\"emailAddresses\":[\"odsfcpkvxodpuozm\",\"zydagfuaxbezyiuo\",\"ktwh\"],\"phoneNumbers\":[\"wz\"]}}]}}") + .toObject(ProvisioningIssue.class); + Assertions.assertEquals("alhbx", model.name()); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ResourceAssociationTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ResourceAssociationTests.java new file mode 100644 index 000000000000..e33f9ab2af39 --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ResourceAssociationTests.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.resourcemanager.botservice.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.botservice.models.AccessMode; +import com.azure.resourcemanager.botservice.models.ResourceAssociation; +import org.junit.jupiter.api.Assertions; + +public final class ResourceAssociationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + ResourceAssociation model = BinaryData.fromString("{\"name\":\"uynhijg\",\"accessMode\":\"Enforced\"}") + .toObject(ResourceAssociation.class); + Assertions.assertEquals("uynhijg", model.name()); + Assertions.assertEquals(AccessMode.ENFORCED, model.accessMode()); + } +} diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/SearchAssistantTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/SearchAssistantTests.java index 4738f4125886..0be104f8d3a3 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/SearchAssistantTests.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/SearchAssistantTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -12,17 +12,17 @@ public final class SearchAssistantTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SearchAssistant model = BinaryData.fromString( - "{\"channelName\":\"SearchAssistant\",\"etag\":\"zdnds\",\"provisioningState\":\"nayqi\",\"location\":\"nduhavhqlkthum\"}") + "{\"channelName\":\"SearchAssistant\",\"etag\":\"kutwpf\",\"provisioningState\":\"a\",\"location\":\"hrskdsnfd\"}") .toObject(SearchAssistant.class); - Assertions.assertEquals("zdnds", model.etag()); - Assertions.assertEquals("nduhavhqlkthum", model.location()); + Assertions.assertEquals("kutwpf", model.etag()); + Assertions.assertEquals("hrskdsnfd", model.location()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SearchAssistant model = new SearchAssistant().withEtag("zdnds").withLocation("nduhavhqlkthum"); + SearchAssistant model = new SearchAssistant().withEtag("kutwpf").withLocation("hrskdsnfd"); model = BinaryData.fromObject(model).toObject(SearchAssistant.class); - Assertions.assertEquals("zdnds", model.etag()); - Assertions.assertEquals("nduhavhqlkthum", model.location()); + Assertions.assertEquals("kutwpf", model.etag()); + Assertions.assertEquals("hrskdsnfd", model.location()); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ServiceProviderParameterMetadataConstraintsTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ServiceProviderParameterMetadataConstraintsTests.java index ee339b7ae169..173ef90a13b1 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ServiceProviderParameterMetadataConstraintsTests.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ServiceProviderParameterMetadataConstraintsTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -12,15 +12,7 @@ public final class ServiceProviderParameterMetadataConstraintsTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceProviderParameterMetadataConstraints model - = BinaryData.fromString("{\"required\":true}").toObject(ServiceProviderParameterMetadataConstraints.class); - Assertions.assertEquals(true, model.required()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceProviderParameterMetadataConstraints model - = new ServiceProviderParameterMetadataConstraints().withRequired(true); - model = BinaryData.fromObject(model).toObject(ServiceProviderParameterMetadataConstraints.class); - Assertions.assertEquals(true, model.required()); + = BinaryData.fromString("{\"required\":false}").toObject(ServiceProviderParameterMetadataConstraints.class); + Assertions.assertFalse(model.required()); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ServiceProviderParameterMetadataTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ServiceProviderParameterMetadataTests.java index fd47748e0854..7b1b17dadd36 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ServiceProviderParameterMetadataTests.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ServiceProviderParameterMetadataTests.java @@ -1,27 +1,18 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.botservice.models.ServiceProviderParameterMetadata; -import com.azure.resourcemanager.botservice.models.ServiceProviderParameterMetadataConstraints; import org.junit.jupiter.api.Assertions; public final class ServiceProviderParameterMetadataTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - ServiceProviderParameterMetadata model = BinaryData.fromString("{\"constraints\":{\"required\":false}}") + ServiceProviderParameterMetadata model = BinaryData.fromString("{\"constraints\":{\"required\":true}}") .toObject(ServiceProviderParameterMetadata.class); - Assertions.assertEquals(false, model.constraints().required()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceProviderParameterMetadata model = new ServiceProviderParameterMetadata() - .withConstraints(new ServiceProviderParameterMetadataConstraints().withRequired(false)); - model = BinaryData.fromObject(model).toObject(ServiceProviderParameterMetadata.class); - Assertions.assertEquals(false, model.constraints().required()); + Assertions.assertTrue(model.constraints().required()); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ServiceProviderParameterTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ServiceProviderParameterTests.java index 37c1f06ea997..f907f0530951 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ServiceProviderParameterTests.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ServiceProviderParameterTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -11,13 +11,7 @@ public final class ServiceProviderParameterTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceProviderParameter model = BinaryData.fromString( - "{\"name\":\"axibxujw\",\"type\":\"qwalmuzyoxaepd\",\"displayName\":\"jancu\",\"description\":\"hdwbavxbniwdjs\",\"helpUrl\":\"tsdbpgn\",\"default\":\"txhp\",\"metadata\":{\"constraints\":{\"required\":false}}}") + "{\"name\":\"syingwfqatmtdht\",\"type\":\"vypgikdg\",\"displayName\":\"ywkbirryuzhlhkjo\",\"description\":\"vqqaatjinrvgo\",\"helpUrl\":\"mfiibfggj\",\"default\":\"olvrw\",\"metadata\":{\"constraints\":{\"required\":false}}}") .toObject(ServiceProviderParameter.class); } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceProviderParameter model = new ServiceProviderParameter(); - model = BinaryData.fromObject(model).toObject(ServiceProviderParameter.class); - } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ServiceProviderPropertiesTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ServiceProviderPropertiesTests.java index 33a33b502a95..e58485d7ac30 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ServiceProviderPropertiesTests.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ServiceProviderPropertiesTests.java @@ -1,30 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.botservice.models.ServiceProviderParameter; import com.azure.resourcemanager.botservice.models.ServiceProviderProperties; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class ServiceProviderPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceProviderProperties model = BinaryData.fromString( - "{\"id\":\"lrsf\",\"displayName\":\"zpwv\",\"serviceProviderName\":\"dqgbiqylihkaetc\",\"devPortalUrl\":\"vfcivfsnkymuc\",\"iconUrl\":\"hjfbebrjcxe\",\"parameters\":[{\"name\":\"utttxfvjrbirp\",\"type\":\"epcyvahfnlj\",\"displayName\":\"qxj\",\"description\":\"ujqgidok\",\"helpUrl\":\"ljyoxgvcltb\",\"default\":\"ncghkje\",\"metadata\":{\"constraints\":{\"required\":true}}},{\"name\":\"jhtxfvgxbfsmxne\",\"type\":\"pvecxgodeb\",\"displayName\":\"kk\",\"description\":\"mpukgriw\",\"helpUrl\":\"zlfbxzpuzycispnq\",\"default\":\"hmgkbrpyy\",\"metadata\":{\"constraints\":{\"required\":true}}},{\"name\":\"qqkpikadrg\",\"type\":\"qagnbuyn\",\"displayName\":\"jggmebfsiarbu\",\"description\":\"cvpnazzmhjrunmpx\",\"helpUrl\":\"dbhrbnlankxm\",\"default\":\"k\",\"metadata\":{\"constraints\":{\"required\":true}}},{\"name\":\"tkcxywnytnrsy\",\"type\":\"qidybyx\",\"displayName\":\"fclhaaxdbabphlwr\",\"description\":\"fkts\",\"helpUrl\":\"sucocmnyyazttbtw\",\"default\":\"qpuedckzywbiex\",\"metadata\":{\"constraints\":{\"required\":false}}}]}") + "{\"id\":\"phqamvdkfwynwcvt\",\"displayName\":\"kayh\",\"serviceProviderName\":\"nvyq\",\"devPortalUrl\":\"tkzwpcnpwzc\",\"iconUrl\":\"esgvvsccyaj\",\"parameters\":[{\"name\":\"hwyg\",\"type\":\"vdnkfxusem\",\"displayName\":\"zrmuhapfcqdps\",\"description\":\"qvpsvuoymg\",\"helpUrl\":\"elvezrypq\",\"default\":\"feo\",\"metadata\":{\"constraints\":{\"required\":true}}},{\"name\":\"yhko\",\"type\":\"pg\",\"displayName\":\"dkow\",\"description\":\"bqpc\",\"helpUrl\":\"kbwcc\",\"default\":\"jvcdwxlpqekf\",\"metadata\":{\"constraints\":{\"required\":false}}}]}") .toObject(ServiceProviderProperties.class); - Assertions.assertEquals("hjfbebrjcxe", model.iconUrl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceProviderProperties model = new ServiceProviderProperties().withIconUrl("hjfbebrjcxe") - .withParameters(Arrays.asList(new ServiceProviderParameter(), new ServiceProviderParameter(), - new ServiceProviderParameter(), new ServiceProviderParameter())); - model = BinaryData.fromObject(model).toObject(ServiceProviderProperties.class); - Assertions.assertEquals("hjfbebrjcxe", model.iconUrl()); + Assertions.assertEquals("esgvvsccyaj", model.iconUrl()); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ServiceProviderResponseListInnerTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ServiceProviderResponseListInnerTests.java index 8c2acaa2d140..635590f50a39 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ServiceProviderResponseListInnerTests.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ServiceProviderResponseListInnerTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -12,15 +12,8 @@ public final class ServiceProviderResponseListInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceProviderResponseListInner model = BinaryData.fromString( - "{\"nextLink\":\"lwtgrhpdj\",\"value\":[{\"properties\":{\"id\":\"sxazjpq\",\"displayName\":\"gual\",\"serviceProviderName\":\"xxhejjzzvd\",\"devPortalUrl\":\"gwdslfhotwm\",\"iconUrl\":\"npwlbjnpg\",\"parameters\":[{\"name\":\"adehxnltyfsopp\",\"type\":\"uesnzwdejbavo\",\"displayName\":\"zdmohctbqvu\",\"description\":\"xdn\",\"helpUrl\":\"vo\",\"default\":\"ujjugwdkcglh\",\"metadata\":{}},{\"name\":\"zj\",\"type\":\"ggd\",\"displayName\":\"ixhbkuofqweykhm\",\"description\":\"evfyexfwhybcib\",\"helpUrl\":\"vdcsitynn\",\"default\":\"mdectehfiqscjey\",\"metadata\":{}},{\"name\":\"ezrkgqhcjrefo\",\"type\":\"mkqsleyyv\",\"displayName\":\"qjpkcattpngjcrc\",\"description\":\"sqpjhvmdajvn\",\"helpUrl\":\"ounqecano\",\"default\":\"upfh\",\"metadata\":{}},{\"name\":\"trpmo\",\"type\":\"mcmatuokthfuiu\",\"displayName\":\"dsfcpkvxodpuoz\",\"description\":\"zydagfuaxbezyiuo\",\"helpUrl\":\"twhrdxwzywqsm\",\"default\":\"ureximoryocfs\",\"metadata\":{}}]}},{\"properties\":{\"id\":\"mddystkiiux\",\"displayName\":\"yudxorrqnbp\",\"serviceProviderName\":\"zvyifqrvkdvj\",\"devPortalUrl\":\"lrmv\",\"iconUrl\":\"f\",\"parameters\":[{\"name\":\"pnpulexxbczwtru\",\"type\":\"qzbqjvsov\",\"displayName\":\"okacspk\",\"description\":\"hzdobpxjmflbvvnc\",\"helpUrl\":\"kcciwwzjuqkhr\",\"default\":\"jiwkuofoskghsau\",\"metadata\":{}}]}},{\"properties\":{\"id\":\"mvxi\",\"displayName\":\"uugidyjrrfby\",\"serviceProviderName\":\"svexcsonpclhoco\",\"devPortalUrl\":\"lkevle\",\"iconUrl\":\"zfbuhf\",\"parameters\":[{\"name\":\"x\",\"type\":\"feiithlvmez\",\"displayName\":\"shxmzsbbzoggigrx\",\"description\":\"ur\",\"helpUrl\":\"xxjnspydptk\",\"default\":\"nkoukn\",\"metadata\":{}},{\"name\":\"wtiukbldn\",\"type\":\"pocipazyxoegu\",\"displayName\":\"jnpiucgyg\",\"description\":\"qzntypm\",\"helpUrl\":\"p\",\"default\":\"c\",\"metadata\":{}},{\"name\":\"j\",\"type\":\"pyd\",\"displayName\":\"yhxdeoejzicwi\",\"description\":\"jttgzf\",\"helpUrl\":\"shcbkhajdeyeamdp\",\"default\":\"g\",\"metadata\":{}}]}}]}") + "{\"nextLink\":\"eyebizikayuhql\",\"value\":[{\"properties\":{\"id\":\"bbqwrvtldg\",\"displayName\":\"pgvmpipaslthaqfx\",\"serviceProviderName\":\"mwutwbdsre\",\"devPortalUrl\":\"drhneuyow\",\"iconUrl\":\"d\",\"parameters\":[{\"name\":\"sibircgpi\",\"type\":\"zimejzanlfzx\",\"displayName\":\"vrmbzono\",\"description\":\"xrjqcirgzpfrlazs\",\"helpUrl\":\"nwoiind\",\"default\":\"wp\",\"metadata\":{}}]}}]}") .toObject(ServiceProviderResponseListInner.class); - Assertions.assertEquals("lwtgrhpdj", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceProviderResponseListInner model = new ServiceProviderResponseListInner().withNextLink("lwtgrhpdj"); - model = BinaryData.fromObject(model).toObject(ServiceProviderResponseListInner.class); - Assertions.assertEquals("lwtgrhpdj", model.nextLink()); + Assertions.assertEquals("eyebizikayuhql", model.nextLink()); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ServiceProviderTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ServiceProviderTests.java index 8e1df73f9d87..51947beba695 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ServiceProviderTests.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/ServiceProviderTests.java @@ -1,31 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; import com.azure.core.util.BinaryData; import com.azure.resourcemanager.botservice.models.ServiceProvider; -import com.azure.resourcemanager.botservice.models.ServiceProviderParameter; -import com.azure.resourcemanager.botservice.models.ServiceProviderProperties; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class ServiceProviderTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServiceProvider model = BinaryData.fromString( - "{\"properties\":{\"id\":\"uxwgipwho\",\"displayName\":\"wkgshwa\",\"serviceProviderName\":\"ixzbinjeputtmryw\",\"devPortalUrl\":\"zoqftiyqzrnkcqvy\",\"iconUrl\":\"whzlsicohoq\",\"parameters\":[{\"name\":\"lryav\",\"type\":\"heun\",\"displayName\":\"qhgyxzkonocukok\",\"description\":\"axuconuq\",\"helpUrl\":\"fkbey\",\"default\":\"wrmjmwvvjektc\",\"metadata\":{\"constraints\":{\"required\":false}}}]}}") + "{\"properties\":{\"id\":\"bt\",\"displayName\":\"flsjc\",\"serviceProviderName\":\"szfjvfbgofelja\",\"devPortalUrl\":\"qmqhldvriii\",\"iconUrl\":\"nalghfkvtvsexso\",\"parameters\":[{\"name\":\"uqhhahhxvrh\",\"type\":\"kwpjgwwspughftqs\",\"displayName\":\"qxujxukndxd\",\"description\":\"rjguufzdmsyqtf\",\"helpUrl\":\"whbotzingamv\",\"default\":\"ho\",\"metadata\":{\"constraints\":{\"required\":true}}}]}}") .toObject(ServiceProvider.class); - Assertions.assertEquals("whzlsicohoq", model.properties().iconUrl()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceProvider model - = new ServiceProvider().withProperties(new ServiceProviderProperties().withIconUrl("whzlsicohoq") - .withParameters(Arrays.asList(new ServiceProviderParameter()))); - model = BinaryData.fromObject(model).toObject(ServiceProvider.class); - Assertions.assertEquals("whzlsicohoq", model.properties().iconUrl()); + Assertions.assertEquals("nalghfkvtvsexso", model.properties().iconUrl()); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/SkuTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/SkuTests.java index e0f451960762..a4085f45b8ae 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/SkuTests.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/SkuTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -12,7 +12,7 @@ public final class SkuTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - Sku model = BinaryData.fromString("{\"name\":\"S1\",\"tier\":\"Standard\"}").toObject(Sku.class); + Sku model = BinaryData.fromString("{\"name\":\"S1\",\"tier\":\"Free\"}").toObject(Sku.class); Assertions.assertEquals(SkuName.S1, model.name()); } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/SkypeChannelPropertiesTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/SkypeChannelPropertiesTests.java index 660013349d05..31570c8c989f 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/SkypeChannelPropertiesTests.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/SkypeChannelPropertiesTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -12,42 +12,42 @@ public final class SkypeChannelPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SkypeChannelProperties model = BinaryData.fromString( - "{\"enableMessaging\":false,\"enableMediaCards\":false,\"enableVideo\":false,\"enableCalling\":false,\"enableScreenSharing\":true,\"enableGroups\":false,\"groupsMode\":\"dnhjdauwhvylw\",\"callingWebHook\":\"tdhxujznbmpowuwp\",\"incomingCallRoute\":\"qlveualupjmkh\",\"isEnabled\":true}") + "{\"enableMessaging\":true,\"enableMediaCards\":false,\"enableVideo\":false,\"enableCalling\":false,\"enableScreenSharing\":true,\"enableGroups\":false,\"groupsMode\":\"ag\",\"callingWebHook\":\"vimjwos\",\"incomingCallRoute\":\"xitc\",\"isEnabled\":false}") .toObject(SkypeChannelProperties.class); - Assertions.assertEquals(false, model.enableMessaging()); - Assertions.assertEquals(false, model.enableMediaCards()); - Assertions.assertEquals(false, model.enableVideo()); - Assertions.assertEquals(false, model.enableCalling()); - Assertions.assertEquals(true, model.enableScreenSharing()); - Assertions.assertEquals(false, model.enableGroups()); - Assertions.assertEquals("dnhjdauwhvylw", model.groupsMode()); - Assertions.assertEquals("tdhxujznbmpowuwp", model.callingWebhook()); - Assertions.assertEquals("qlveualupjmkh", model.incomingCallRoute()); - Assertions.assertEquals(true, model.isEnabled()); + Assertions.assertTrue(model.enableMessaging()); + Assertions.assertFalse(model.enableMediaCards()); + Assertions.assertFalse(model.enableVideo()); + Assertions.assertFalse(model.enableCalling()); + Assertions.assertTrue(model.enableScreenSharing()); + Assertions.assertFalse(model.enableGroups()); + Assertions.assertEquals("ag", model.groupsMode()); + Assertions.assertEquals("vimjwos", model.callingWebHook()); + Assertions.assertEquals("xitc", model.incomingCallRoute()); + Assertions.assertFalse(model.isEnabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SkypeChannelProperties model = new SkypeChannelProperties().withEnableMessaging(false) + SkypeChannelProperties model = new SkypeChannelProperties().withEnableMessaging(true) .withEnableMediaCards(false) .withEnableVideo(false) .withEnableCalling(false) .withEnableScreenSharing(true) .withEnableGroups(false) - .withGroupsMode("dnhjdauwhvylw") - .withCallingWebhook("tdhxujznbmpowuwp") - .withIncomingCallRoute("qlveualupjmkh") - .withIsEnabled(true); + .withGroupsMode("ag") + .withCallingWebHook("vimjwos") + .withIncomingCallRoute("xitc") + .withIsEnabled(false); model = BinaryData.fromObject(model).toObject(SkypeChannelProperties.class); - Assertions.assertEquals(false, model.enableMessaging()); - Assertions.assertEquals(false, model.enableMediaCards()); - Assertions.assertEquals(false, model.enableVideo()); - Assertions.assertEquals(false, model.enableCalling()); - Assertions.assertEquals(true, model.enableScreenSharing()); - Assertions.assertEquals(false, model.enableGroups()); - Assertions.assertEquals("dnhjdauwhvylw", model.groupsMode()); - Assertions.assertEquals("tdhxujznbmpowuwp", model.callingWebhook()); - Assertions.assertEquals("qlveualupjmkh", model.incomingCallRoute()); - Assertions.assertEquals(true, model.isEnabled()); + Assertions.assertTrue(model.enableMessaging()); + Assertions.assertFalse(model.enableMediaCards()); + Assertions.assertFalse(model.enableVideo()); + Assertions.assertFalse(model.enableCalling()); + Assertions.assertTrue(model.enableScreenSharing()); + Assertions.assertFalse(model.enableGroups()); + Assertions.assertEquals("ag", model.groupsMode()); + Assertions.assertEquals("vimjwos", model.callingWebHook()); + Assertions.assertEquals("xitc", model.incomingCallRoute()); + Assertions.assertFalse(model.isEnabled()); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/SkypeChannelTests.java b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/SkypeChannelTests.java index e76a611cadaf..588454252e8b 100644 --- a/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/SkypeChannelTests.java +++ b/sdk/botservice/azure-resourcemanager-botservice/src/test/java/com/azure/resourcemanager/botservice/generated/SkypeChannelTests.java @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. +// Code generated by Microsoft (R) TypeSpec Code Generator. package com.azure.resourcemanager.botservice.generated; @@ -13,48 +13,48 @@ public final class SkypeChannelTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { SkypeChannel model = BinaryData.fromString( - "{\"channelName\":\"SkypeChannel\",\"properties\":{\"enableMessaging\":false,\"enableMediaCards\":true,\"enableVideo\":false,\"enableCalling\":true,\"enableScreenSharing\":true,\"enableGroups\":false,\"groupsMode\":\"ebwpucwwfvo\",\"callingWebHook\":\"vmeueci\",\"incomingCallRoute\":\"hzceuojgjrwjue\",\"isEnabled\":false},\"etag\":\"wmcdytdxwi\",\"provisioningState\":\"nrjawgqwg\",\"location\":\"ni\"}") + "{\"channelName\":\"SkypeChannel\",\"properties\":{\"enableMessaging\":false,\"enableMediaCards\":false,\"enableVideo\":false,\"enableCalling\":true,\"enableScreenSharing\":false,\"enableGroups\":true,\"groupsMode\":\"fnjhfjxwmszkkfo\",\"callingWebHook\":\"eyfkzikfja\",\"incomingCallRoute\":\"eaivxwczel\",\"isEnabled\":false},\"etag\":\"r\",\"provisioningState\":\"sfeaenwabfat\",\"location\":\"ddxbjhwuaanoz\"}") .toObject(SkypeChannel.class); - Assertions.assertEquals("wmcdytdxwi", model.etag()); - Assertions.assertEquals("ni", model.location()); - Assertions.assertEquals(false, model.properties().enableMessaging()); - Assertions.assertEquals(true, model.properties().enableMediaCards()); - Assertions.assertEquals(false, model.properties().enableVideo()); - Assertions.assertEquals(true, model.properties().enableCalling()); - Assertions.assertEquals(true, model.properties().enableScreenSharing()); - Assertions.assertEquals(false, model.properties().enableGroups()); - Assertions.assertEquals("ebwpucwwfvo", model.properties().groupsMode()); - Assertions.assertEquals("vmeueci", model.properties().callingWebhook()); - Assertions.assertEquals("hzceuojgjrwjue", model.properties().incomingCallRoute()); - Assertions.assertEquals(false, model.properties().isEnabled()); + Assertions.assertEquals("r", model.etag()); + Assertions.assertEquals("ddxbjhwuaanoz", model.location()); + Assertions.assertFalse(model.properties().enableMessaging()); + Assertions.assertFalse(model.properties().enableMediaCards()); + Assertions.assertFalse(model.properties().enableVideo()); + Assertions.assertTrue(model.properties().enableCalling()); + Assertions.assertFalse(model.properties().enableScreenSharing()); + Assertions.assertTrue(model.properties().enableGroups()); + Assertions.assertEquals("fnjhfjxwmszkkfo", model.properties().groupsMode()); + Assertions.assertEquals("eyfkzikfja", model.properties().callingWebHook()); + Assertions.assertEquals("eaivxwczel", model.properties().incomingCallRoute()); + Assertions.assertFalse(model.properties().isEnabled()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SkypeChannel model = new SkypeChannel().withEtag("wmcdytdxwi") - .withLocation("ni") + SkypeChannel model = new SkypeChannel().withEtag("r") + .withLocation("ddxbjhwuaanoz") .withProperties(new SkypeChannelProperties().withEnableMessaging(false) - .withEnableMediaCards(true) + .withEnableMediaCards(false) .withEnableVideo(false) .withEnableCalling(true) - .withEnableScreenSharing(true) - .withEnableGroups(false) - .withGroupsMode("ebwpucwwfvo") - .withCallingWebhook("vmeueci") - .withIncomingCallRoute("hzceuojgjrwjue") + .withEnableScreenSharing(false) + .withEnableGroups(true) + .withGroupsMode("fnjhfjxwmszkkfo") + .withCallingWebHook("eyfkzikfja") + .withIncomingCallRoute("eaivxwczel") .withIsEnabled(false)); model = BinaryData.fromObject(model).toObject(SkypeChannel.class); - Assertions.assertEquals("wmcdytdxwi", model.etag()); - Assertions.assertEquals("ni", model.location()); - Assertions.assertEquals(false, model.properties().enableMessaging()); - Assertions.assertEquals(true, model.properties().enableMediaCards()); - Assertions.assertEquals(false, model.properties().enableVideo()); - Assertions.assertEquals(true, model.properties().enableCalling()); - Assertions.assertEquals(true, model.properties().enableScreenSharing()); - Assertions.assertEquals(false, model.properties().enableGroups()); - Assertions.assertEquals("ebwpucwwfvo", model.properties().groupsMode()); - Assertions.assertEquals("vmeueci", model.properties().callingWebhook()); - Assertions.assertEquals("hzceuojgjrwjue", model.properties().incomingCallRoute()); - Assertions.assertEquals(false, model.properties().isEnabled()); + Assertions.assertEquals("r", model.etag()); + Assertions.assertEquals("ddxbjhwuaanoz", model.location()); + Assertions.assertFalse(model.properties().enableMessaging()); + Assertions.assertFalse(model.properties().enableMediaCards()); + Assertions.assertFalse(model.properties().enableVideo()); + Assertions.assertTrue(model.properties().enableCalling()); + Assertions.assertFalse(model.properties().enableScreenSharing()); + Assertions.assertTrue(model.properties().enableGroups()); + Assertions.assertEquals("fnjhfjxwmszkkfo", model.properties().groupsMode()); + Assertions.assertEquals("eyfkzikfja", model.properties().callingWebHook()); + Assertions.assertEquals("eaivxwczel", model.properties().incomingCallRoute()); + Assertions.assertFalse(model.properties().isEnabled()); } } diff --git a/sdk/botservice/azure-resourcemanager-botservice/tsp-location.yaml b/sdk/botservice/azure-resourcemanager-botservice/tsp-location.yaml new file mode 100644 index 000000000000..2fe9300b238d --- /dev/null +++ b/sdk/botservice/azure-resourcemanager-botservice/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/botservice/resource-manager/Microsoft.BotService/BotService +commit: 98a4db5d6c32ff5a3ad5780fce6c716cafdbbeec +repo: Azure/azure-rest-api-specs +additionalDirectories: