From fd474821a1e3de1fcfaabc9e7561dae9e735047c Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 25 Dec 2024 23:16:22 -0800 Subject: [PATCH] [Automation] Generate Fluent Lite from Swagger servicelinker#package-2022-05-01 (#43627) --- eng/versioning/version_client.txt | 2 +- .../CHANGELOG.md | 10 +- .../README.md | 4 +- .../SAMPLE.md | 706 +---- .../pom.xml | 6 +- .../servicelinker/ServiceLinkerManager.java | 55 +- .../ConfigurationNamesOperationsClient.java | 42 - .../fluent/ConnectorsClient.java | 627 ---- .../servicelinker/fluent/LinkersClient.java | 56 +- .../fluent/LinkersOperationsClient.java | 277 -- .../fluent/ServiceLinkerManagementClient.java | 21 - .../models/ConfigurationNameItemInner.java | 231 -- .../fluent/models/ConfigurationNames.java | 248 -- .../models/DaprConfigurationProperties.java | 154 - .../DaprConfigurationResourceInner.java | 158 - .../fluent/models/DryrunProperties.java | 158 - .../fluent/models/DryrunResourceInner.java | 208 -- .../fluent/models/LinkerProperties.java | 81 +- .../fluent/models/LinkerResourceInner.java | 58 +- ...va => SourceConfigurationResultInner.java} | 27 +- .../models/ValidateOperationResultInner.java | 12 +- .../fluent/models/ValidateResult.java | 8 +- .../ConfigurationNameItemImpl.java | 64 - ...onfigurationNamesOperationsClientImpl.java | 268 -- .../ConfigurationNamesOperationsImpl.java | 45 - .../implementation/ConnectorsClientImpl.java | 2692 ----------------- .../implementation/ConnectorsImpl.java | 327 -- .../DaprConfigurationResourceImpl.java | 42 - .../implementation/DryrunResourceImpl.java | 172 -- .../implementation/LinkerResourceImpl.java | 36 +- .../implementation/LinkersClientImpl.java | 150 +- .../implementation/LinkersImpl.java | 16 +- .../LinkersOperationsClientImpl.java | 1268 -------- .../implementation/LinkersOperationsImpl.java | 150 - .../ServiceLinkerManagementClientImpl.java | 50 +- ...ava => SourceConfigurationResultImpl.java} | 12 +- .../models/AccessKeyInfoBase.java | 131 - .../models/AccessKeyPermissions.java | 66 - .../servicelinker/models/ActionType.java | 10 - .../servicelinker/models/AllowType.java | 51 - .../servicelinker/models/AuthInfoBase.java | 46 +- .../servicelinker/models/AuthMode.java | 51 - .../servicelinker/models/AuthType.java | 15 - .../models/AzureAppConfigProperties.java | 114 - .../models/AzureResourcePropertiesBase.java | 2 - .../models/AzureResourceType.java | 5 - .../BasicErrorDryrunPrerequisiteResult.java | 141 - .../servicelinker/models/ClientType.java | 10 - .../models/ConfigurationInfo.java | 294 -- .../models/ConfigurationName.java | 149 - .../models/ConfigurationNameItem.java | 63 - .../models/ConfigurationNameResult.java | 116 - .../models/ConfigurationNamesOperations.java | 37 - .../models/ConfigurationStore.java | 93 - .../servicelinker/models/Connectors.java | 373 --- .../CreateOrUpdateDryrunParameters.java | 346 --- .../models/DaprBindingComponentDirection.java | 51 - .../models/DaprConfigurationList.java | 116 - .../models/DaprConfigurationResource.java | 40 - .../servicelinker/models/DaprMetadata.java | 205 -- .../models/DaprMetadataRequired.java | 51 - .../servicelinker/models/DaprProperties.java | 244 -- .../models/DatabaseAadAuthInfo.java | 93 - .../models/DeleteOrUpdateBehavior.java | 51 - .../models/DryrunActionName.java | 46 - .../servicelinker/models/DryrunList.java | 128 - .../models/DryrunOperationPreview.java | 211 -- .../models/DryrunParameters.java | 107 - .../servicelinker/models/DryrunPatch.java | 137 - .../models/DryrunPrerequisiteResult.java | 110 - .../models/DryrunPrerequisiteResultType.java | 51 - .../models/DryrunPreviewOperationType.java | 56 - .../servicelinker/models/DryrunResource.java | 212 -- .../EasyAuthMicrosoftEntraIdAuthInfo.java | 184 -- .../servicelinker/models/FabricPlatform.java | 111 - .../servicelinker/models/FirewallRules.java | 158 - .../models/LinkerConfigurationType.java | 53 - .../{ResourceList.java => LinkerList.java} | 38 +- .../servicelinker/models/LinkerPatch.java | 50 +- .../servicelinker/models/LinkerResource.java | 95 +- .../servicelinker/models/Linkers.java | 30 +- .../models/LinkersOperations.java | 192 -- ...ssionsMissingDryrunPrerequisiteResult.java | 171 -- .../models/PublicNetworkSolution.java | 161 - .../servicelinker/models/SecretAuthInfo.java | 14 +- .../models/SecretSourceType.java | 51 - .../servicelinker/models/SecretStore.java | 30 - .../models/SelfHostedServer.java | 111 - .../ServicePrincipalCertificateAuthInfo.java | 78 +- .../ServicePrincipalSecretAuthInfo.java | 104 +- .../models/SourceConfiguration.java | 74 - ...lt.java => SourceConfigurationResult.java} | 10 +- .../SystemAssignedIdentityAuthInfo.java | 108 +- .../models/TargetServiceBase.java | 4 - .../models/TargetServiceType.java | 10 - .../models/UserAccountAuthInfo.java | 213 -- .../models/UserAssignedIdentityAuthInfo.java | 104 +- .../servicelinker/models/VNetSolution.java | 32 - .../models/ValidateOperationResult.java | 4 +- .../models/ValidationResultItem.java | 2 +- .../proxy-config.json | 2 +- ...onfigurationNamesOperationListSamples.java | 24 - .../ConnectorCreateDryrunSamples.java | 36 - .../ConnectorCreateOrUpdateSamples.java | 35 - .../ConnectorDeleteDryrunSamples.java | 26 - .../generated/ConnectorDeleteSamples.java | 26 - ...onnectorGenerateConfigurationsSamples.java | 44 - .../generated/ConnectorGetDryrunSamples.java | 26 - .../generated/ConnectorGetSamples.java | 26 - .../generated/ConnectorListDryrunSamples.java | 25 - .../generated/ConnectorListSamples.java | 25 - .../ConnectorUpdateDryrunSamples.java | 39 - .../generated/ConnectorUpdateSamples.java | 35 - .../generated/ConnectorValidateSamples.java | 26 - .../LinkerCreateOrUpdateSamples.java | 57 +- .../generated/LinkerDeleteSamples.java | 7 +- .../generated/LinkerGetSamples.java | 7 +- .../LinkerListConfigurationsSamples.java | 6 +- .../generated/LinkerListSamples.java | 7 +- .../generated/LinkerUpdateSamples.java | 7 +- .../generated/LinkerValidateSamples.java | 8 +- .../LinkersOperationCreateDryrunSamples.java | 39 - .../LinkersOperationDeleteDryrunSamples.java | 27 - ...perationGenerateConfigurationsSamples.java | 45 - .../LinkersOperationGetDryrunSamples.java | 27 - ...perationListDaprConfigurationsSamples.java | 27 - .../LinkersOperationListDryrunSamples.java | 27 - .../LinkersOperationUpdateDryrunSamples.java | 39 - .../generated/OperationsListSamples.java | 4 +- .../generated/AccessKeyInfoBaseTests.java | 33 - .../generated/AuthInfoBaseTests.java | 9 +- .../AzureAppConfigPropertiesTests.java | 26 - .../AzureKeyVaultPropertiesTests.java | 8 +- .../generated/AzureResourceTests.java | 8 +- .../generated/ConfigurationNameTests.java | 31 - .../generated/ConfigurationStoreTests.java | 25 - .../ConfluentBootstrapServerTests.java | 8 +- .../ConfluentSchemaRegistryTests.java | 8 +- .../ConnectorsCreateDryrunMockTests.java | 40 - ...torsDeleteDryrunWithResponseMockTests.java | 35 - .../generated/ConnectorsDeleteMockTests.java | 33 - ...nectorsGetDryrunWithResponseMockTests.java | 37 - .../ConnectorsListDryrunMockTests.java | 37 - .../generated/DatabaseAadAuthInfoTests.java | 25 - .../generated/DryrunListTests.java | 33 - .../DryrunOperationPreviewTests.java | 39 - .../generated/DryrunParametersTests.java | 22 - .../generated/DryrunPatchTests.java | 24 - .../DryrunPrerequisiteResultTests.java | 22 - .../generated/DryrunPropertiesTests.java | 24 - .../generated/DryrunResourceInnerTests.java | 24 - .../generated/FabricPlatformTests.java | 25 - .../generated/FirewallRulesTests.java | 35 - .../generated/LinkersDeleteMockTests.java | 2 +- ...tConfigurationsWithResponseMockTests.java} | 15 +- ...inkersOperationsCreateDryrunMockTests.java | 39 - ...rationsGetDryrunWithResponseMockTests.java | 37 - .../LinkersOperationsListDryrunMockTests.java | 37 - ...inkersOperationsUpdateDryrunMockTests.java | 39 - .../generated/OperationDisplayTests.java | 2 +- .../generated/OperationInnerTests.java | 2 +- .../generated/OperationListResultTests.java | 2 +- .../generated/OperationsListMockTests.java | 2 +- ...sMissingDryrunPrerequisiteResultTests.java | 34 - .../generated/PublicNetworkSolutionTests.java | 44 - .../generated/SelfHostedServerTests.java | 25 - ...vicePrincipalCertificateAuthInfoTests.java | 33 +- .../SourceConfigurationResultInnerTests.java | 31 + .../generated/SourceConfigurationTests.java | 27 + .../SystemAssignedIdentityAuthInfoTests.java | 21 +- .../generated/UserAccountAuthInfoTests.java | 41 - .../UserAssignedIdentityAuthInfoTests.java | 31 +- .../generated/VNetSolutionTests.java | 14 +- 173 files changed, 471 insertions(+), 16002 deletions(-) delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/ConfigurationNamesOperationsClient.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/ConnectorsClient.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/LinkersOperationsClient.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/ConfigurationNameItemInner.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/ConfigurationNames.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/DaprConfigurationProperties.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/DaprConfigurationResourceInner.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/DryrunProperties.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/DryrunResourceInner.java rename sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/{ConfigurationResultInner.java => SourceConfigurationResultInner.java} (70%) delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConfigurationNameItemImpl.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConfigurationNamesOperationsClientImpl.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConfigurationNamesOperationsImpl.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConnectorsClientImpl.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConnectorsImpl.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/DaprConfigurationResourceImpl.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/DryrunResourceImpl.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/LinkersOperationsClientImpl.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/LinkersOperationsImpl.java rename sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/{ConfigurationResultImpl.java => SourceConfigurationResultImpl.java} (70%) delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AccessKeyInfoBase.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AccessKeyPermissions.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AllowType.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AuthMode.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AzureAppConfigProperties.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/BasicErrorDryrunPrerequisiteResult.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationInfo.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationName.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationNameItem.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationNameResult.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationNamesOperations.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationStore.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/Connectors.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/CreateOrUpdateDryrunParameters.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DaprBindingComponentDirection.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DaprConfigurationList.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DaprConfigurationResource.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DaprMetadata.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DaprMetadataRequired.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DaprProperties.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DatabaseAadAuthInfo.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DeleteOrUpdateBehavior.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunActionName.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunList.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunOperationPreview.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunParameters.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunPatch.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunPrerequisiteResult.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunPrerequisiteResultType.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunPreviewOperationType.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunResource.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/EasyAuthMicrosoftEntraIdAuthInfo.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/FabricPlatform.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/FirewallRules.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/LinkerConfigurationType.java rename sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/{ResourceList.java => LinkerList.java} (70%) delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/LinkersOperations.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/PermissionsMissingDryrunPrerequisiteResult.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/PublicNetworkSolution.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SecretSourceType.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SelfHostedServer.java rename sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/{ConfigurationResult.java => SourceConfigurationResult.java} (64%) delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/UserAccountAuthInfo.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConfigurationNamesOperationListSamples.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorCreateDryrunSamples.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorCreateOrUpdateSamples.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorDeleteDryrunSamples.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorDeleteSamples.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorGenerateConfigurationsSamples.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorGetDryrunSamples.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorGetSamples.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorListDryrunSamples.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorListSamples.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorUpdateDryrunSamples.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorUpdateSamples.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorValidateSamples.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationCreateDryrunSamples.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationDeleteDryrunSamples.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationGenerateConfigurationsSamples.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationGetDryrunSamples.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationListDaprConfigurationsSamples.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationListDryrunSamples.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationUpdateDryrunSamples.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/AccessKeyInfoBaseTests.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/AzureAppConfigPropertiesTests.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConfigurationNameTests.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConfigurationStoreTests.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConnectorsCreateDryrunMockTests.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConnectorsDeleteDryrunWithResponseMockTests.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConnectorsDeleteMockTests.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConnectorsGetDryrunWithResponseMockTests.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConnectorsListDryrunMockTests.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/DatabaseAadAuthInfoTests.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/DryrunListTests.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/DryrunOperationPreviewTests.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/DryrunParametersTests.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/DryrunPatchTests.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/DryrunPrerequisiteResultTests.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/DryrunPropertiesTests.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/DryrunResourceInnerTests.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/FabricPlatformTests.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/FirewallRulesTests.java rename sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/{LinkersOperationsDeleteDryrunWithResponseMockTests.java => LinkersListConfigurationsWithResponseMockTests.java} (56%) delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationsCreateDryrunMockTests.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationsGetDryrunWithResponseMockTests.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationsListDryrunMockTests.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationsUpdateDryrunMockTests.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/PermissionsMissingDryrunPrerequisiteResultTests.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/PublicNetworkSolutionTests.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/SelfHostedServerTests.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/SourceConfigurationResultInnerTests.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/SourceConfigurationTests.java delete mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/UserAccountAuthInfoTests.java diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index a9fd85631a6f7..342b44dfae072 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -400,7 +400,7 @@ com.azure.resourcemanager:azure-resourcemanager-dnsresolver;1.0.0-beta.4;1.0.0-b com.azure.resourcemanager:azure-resourcemanager-mobilenetwork;1.3.0;1.4.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-azureadexternalidentities;1.0.0-beta.1;1.0.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-dashboard;1.1.0;1.2.0-beta.1 -com.azure.resourcemanager:azure-resourcemanager-servicelinker;1.0.0-beta.4;1.0.0-beta.5 +com.azure.resourcemanager:azure-resourcemanager-servicelinker;1.0.0-beta.4;1.0.0 com.azure.resourcemanager:azure-resourcemanager-appcontainers;1.0.0;1.1.0-beta.2 com.azure.resourcemanager:azure-resourcemanager-scvmm;1.0.0;1.1.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-hardwaresecuritymodules;1.0.0;1.1.0-beta.1 diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/CHANGELOG.md b/sdk/servicelinker/azure-resourcemanager-servicelinker/CHANGELOG.md index 8c70fcb99b3f6..5300e4c94dba5 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/CHANGELOG.md +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/CHANGELOG.md @@ -1,15 +1,13 @@ # Release History -## 1.0.0-beta.5 (Unreleased) +## 1.0.0 (2024-12-26) -### Features Added - -### Breaking Changes - -### Bugs Fixed +- Azure Resource Manager ServiceLinker client library for Java. This package contains Microsoft Azure SDK for ServiceLinker Management SDK. Microsoft.ServiceLinker provider. Package tag package-2022-05-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Other Changes +- Release for Azure Resource Manager ServiceLinker client library for Java. + ## 1.0.0-beta.4 (2024-10-09) - Azure Resource Manager ServiceLinker client library for Java. This package contains Microsoft Azure SDK for ServiceLinker Management SDK. Microsoft.ServiceLinker provider. Package tag package-2024-07-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/README.md b/sdk/servicelinker/azure-resourcemanager-servicelinker/README.md index 7351ec3469ce7..febe99d4091df 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/README.md +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/README.md @@ -2,7 +2,7 @@ Azure Resource Manager ServiceLinker client library for Java. -This package contains Microsoft Azure SDK for ServiceLinker Management SDK. Microsoft.ServiceLinker provider. Package tag package-2024-07-01-preview. 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 ServiceLinker Management SDK. Microsoft.ServiceLinker provider. Package tag package-2022-05-01. 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 @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-servicelinker - 1.0.0-beta.4 + 1.0.0 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/SAMPLE.md b/sdk/servicelinker/azure-resourcemanager-servicelinker/SAMPLE.md index 4de60a381893c..414362be96f90 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/SAMPLE.md +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/SAMPLE.md @@ -1,25 +1,6 @@ # Code snippets and samples -## ConfigurationNamesOperation - -- [List](#configurationnamesoperation_list) - -## Connector - -- [CreateDryrun](#connector_createdryrun) -- [CreateOrUpdate](#connector_createorupdate) -- [Delete](#connector_delete) -- [DeleteDryrun](#connector_deletedryrun) -- [GenerateConfigurations](#connector_generateconfigurations) -- [Get](#connector_get) -- [GetDryrun](#connector_getdryrun) -- [List](#connector_list) -- [ListDryrun](#connector_listdryrun) -- [Update](#connector_update) -- [UpdateDryrun](#connector_updatedryrun) -- [Validate](#connector_validate) - ## Linker - [CreateOrUpdate](#linker_createorupdate) @@ -30,423 +11,81 @@ - [Update](#linker_update) - [Validate](#linker_validate) -## LinkersOperation - -- [CreateDryrun](#linkersoperation_createdryrun) -- [DeleteDryrun](#linkersoperation_deletedryrun) -- [GenerateConfigurations](#linkersoperation_generateconfigurations) -- [GetDryrun](#linkersoperation_getdryrun) -- [ListDaprConfigurations](#linkersoperation_listdaprconfigurations) -- [ListDryrun](#linkersoperation_listdryrun) -- [UpdateDryrun](#linkersoperation_updatedryrun) - ## Operations - [List](#operations_list) -### ConfigurationNamesOperation_List - -```java -/** - * Samples for ConfigurationNamesOperation List. - */ -public final class ConfigurationNamesOperationListSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * ConfigurationNamesList.json - */ - /** - * Sample code: GetConfigurationNames. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void getConfigurationNames(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.configurationNamesOperations().list(null, null, com.azure.core.util.Context.NONE); - } -} -``` - -### Connector_CreateDryrun - -```java -import com.azure.resourcemanager.servicelinker.models.AzureResource; -import com.azure.resourcemanager.servicelinker.models.CreateOrUpdateDryrunParameters; -import com.azure.resourcemanager.servicelinker.models.SecretAuthInfo; -import com.azure.resourcemanager.servicelinker.models.ValueSecretInfo; - -/** - * Samples for Connector CreateDryrun. - */ -public final class ConnectorCreateDryrunSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * ConnectorDryrunCreate.json - */ - /** - * Sample code: ConnectorDryrunCreate. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void connectorDryrunCreate(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.connectors() - .define("dryrunName") - .withExistingLocation("00000000-0000-0000-0000-000000000000", "test-rg", "westus") - .withParameters(new CreateOrUpdateDryrunParameters().withTargetService(new AzureResource().withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db")) - .withAuthInfo( - new SecretAuthInfo().withName("name").withSecretInfo(new ValueSecretInfo().withValue("secret")))) - .create(); - } -} -``` - -### Connector_CreateOrUpdate +### Linker_CreateOrUpdate ```java -import com.azure.resourcemanager.servicelinker.fluent.models.LinkerResourceInner; import com.azure.resourcemanager.servicelinker.models.AzureResource; +import com.azure.resourcemanager.servicelinker.models.KeyVaultSecretUriSecretInfo; import com.azure.resourcemanager.servicelinker.models.SecretAuthInfo; import com.azure.resourcemanager.servicelinker.models.SecretStore; - -/** - * Samples for Connector CreateOrUpdate. - */ -public final class ConnectorCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * PutConnector.json - */ - /** - * Sample code: PutConnector. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void putConnector(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.connectors() - .createOrUpdate("00000000-0000-0000-0000-000000000000", "test-rg", "westus", "connectorName", - new LinkerResourceInner().withTargetService(new AzureResource().withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db")) - .withAuthInfo(new SecretAuthInfo()) - .withSecretStore(new SecretStore().withKeyVaultId("fakeTokenPlaceholder")), - com.azure.core.util.Context.NONE); - } -} -``` - -### Connector_Delete - -```java -/** - * Samples for Connector Delete. - */ -public final class ConnectorDeleteSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * DeleteConnector.json - */ - /** - * Sample code: DeleteConnector. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void deleteConnector(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.connectors() - .delete("00000000-0000-0000-0000-000000000000", "test-rg", "westus", "connectorName", - com.azure.core.util.Context.NONE); - } -} -``` - -### Connector_DeleteDryrun - -```java -/** - * Samples for Connector DeleteDryrun. - */ -public final class ConnectorDeleteDryrunSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * ConnectorDryrunDelete.json - */ - /** - * Sample code: ConnectorDryrunDelete. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void connectorDryrunDelete(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.connectors() - .deleteDryrunWithResponse("00000000-0000-0000-0000-000000000000", "test-rg", "westus", "dryrunName", - com.azure.core.util.Context.NONE); - } -} -``` - -### Connector_GenerateConfigurations - -```java -import com.azure.resourcemanager.servicelinker.models.ConfigurationInfo; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Connector GenerateConfigurations. - */ -public final class ConnectorGenerateConfigurationsSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * GenerateConfigurations.json - */ - /** - * Sample code: GenerateConfiguration. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void generateConfiguration(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.connectors() - .generateConfigurationsWithResponse( - "00000000-0000-0000-0000-000000000000", "test-rg", "westus", "connectorName", new ConfigurationInfo() - .withCustomizedKeys(mapOf("ASL_DocumentDb_ConnectionString", "MyConnectionstring")), - com.azure.core.util.Context.NONE); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} -``` - -### Connector_Get - -```java -/** - * Samples for Connector Get. - */ -public final class ConnectorGetSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * Connectors.json - */ - /** - * Sample code: Connector. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void connector(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.connectors() - .getWithResponse("00000000-0000-0000-0000-000000000000", "test-rg", "westus", "connectorName", - com.azure.core.util.Context.NONE); - } -} -``` - -### Connector_GetDryrun - -```java -/** - * Samples for Connector GetDryrun. - */ -public final class ConnectorGetDryrunSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * ConnectorDryrunGet.json - */ - /** - * Sample code: ConnectorDryrunGet. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void connectorDryrunGet(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.connectors() - .getDryrunWithResponse("00000000-0000-0000-0000-000000000000", "test-rg", "westus", "dryrunName", - com.azure.core.util.Context.NONE); - } -} -``` - -### Connector_List - -```java -/** - * Samples for Connector List. - */ -public final class ConnectorListSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * ConnectorList.json - */ - /** - * Sample code: ConnectorList. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void connectorList(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.connectors() - .list("00000000-0000-0000-0000-000000000000", "test-rg", "westus", com.azure.core.util.Context.NONE); - } -} -``` - -### Connector_ListDryrun - -```java -/** - * Samples for Connector ListDryrun. - */ -public final class ConnectorListDryrunSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * ConnectorDryrunList.json - */ - /** - * Sample code: ConnectorDryrunList. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void connectorDryrunList(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.connectors() - .listDryrun("00000000-0000-0000-0000-000000000000", "test-rg", "westus", com.azure.core.util.Context.NONE); - } -} -``` - -### Connector_Update - -```java -import com.azure.resourcemanager.servicelinker.models.AzureResource; -import com.azure.resourcemanager.servicelinker.models.LinkerPatch; -import com.azure.resourcemanager.servicelinker.models.ServicePrincipalSecretAuthInfo; - -/** - * Samples for Connector Update. - */ -public final class ConnectorUpdateSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * PatchConnector.json - */ - /** - * Sample code: PatchConnector. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void patchConnector(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.connectors() - .update("00000000-0000-0000-0000-000000000000", "test-rg", "westus", "connectorName", - new LinkerPatch().withTargetService(new AzureResource().withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db")) - .withAuthInfo(new ServicePrincipalSecretAuthInfo().withClientId("name") - .withPrincipalId("id") - .withSecret("fakeTokenPlaceholder")), - com.azure.core.util.Context.NONE); - } -} -``` - -### Connector_UpdateDryrun - -```java -import com.azure.resourcemanager.servicelinker.models.AzureResource; -import com.azure.resourcemanager.servicelinker.models.CreateOrUpdateDryrunParameters; -import com.azure.resourcemanager.servicelinker.models.DryrunResource; -import com.azure.resourcemanager.servicelinker.models.SecretAuthInfo; +import com.azure.resourcemanager.servicelinker.models.VNetSolution; +import com.azure.resourcemanager.servicelinker.models.VNetSolutionType; import com.azure.resourcemanager.servicelinker.models.ValueSecretInfo; /** - * Samples for Connector UpdateDryrun. + * Samples for Linker CreateOrUpdate. */ -public final class ConnectorUpdateDryrunSamples { +public final class LinkerCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * ConnectorDryrunUpdate.json + * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/ + * PutLinkWithSecretStore.json */ /** - * Sample code: ConnectorDryrunUpdate. + * Sample code: PutLinkWithSecretStore. * * @param manager Entry point to ServiceLinkerManager. */ - public static void connectorDryrunUpdate(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - DryrunResource resource = manager.connectors() - .getDryrunWithResponse("00000000-0000-0000-0000-000000000000", "test-rg", "westus", "dryrunName", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withParameters(new CreateOrUpdateDryrunParameters().withTargetService(new AzureResource().withId( + public static void putLinkWithSecretStore(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { + manager.linkers() + .define("linkName") + .withExistingResourceUri( + "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app") + .withTargetService(new AzureResource().withId( "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db")) - .withAuthInfo( - new SecretAuthInfo().withName("name").withSecretInfo(new ValueSecretInfo().withValue("secret")))) - .apply(); + .withAuthInfo(new SecretAuthInfo()) + .withSecretStore(new SecretStore().withKeyVaultId("fakeTokenPlaceholder")) + .create(); } -} -``` - -### Connector_Validate -```java -/** - * Samples for Connector Validate. - */ -public final class ConnectorValidateSamples { /* * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * ValidateConnectorSuccess.json + * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/ + * PutLinkWithServiceEndpoint.json */ /** - * Sample code: ValidateConnectorSuccess. + * Sample code: PutLinkWithServiceEndpoint. * * @param manager Entry point to ServiceLinkerManager. */ - public static void validateConnectorSuccess(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.connectors() - .validate("00000000-0000-0000-0000-000000000000", "test-rg", "westus", "connectorName", - com.azure.core.util.Context.NONE); + public static void + putLinkWithServiceEndpoint(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { + manager.linkers() + .define("linkName") + .withExistingResourceUri( + "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app") + .withTargetService(new AzureResource().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DBforPostgreSQL/servers/test-pg/databases/test-db")) + .withAuthInfo(new SecretAuthInfo().withName("name") + .withSecretInfo(new KeyVaultSecretUriSecretInfo().withValue( + "https://vault-name.vault.azure.net/secrets/secret-name/00000000000000000000000000000000"))) + .withVNetSolution(new VNetSolution().withType(VNetSolutionType.SERVICE_ENDPOINT)) + .create(); } -} -``` - -### Linker_CreateOrUpdate - -```java -import com.azure.resourcemanager.servicelinker.models.AzureResource; -import com.azure.resourcemanager.servicelinker.models.SecretAuthInfo; -import com.azure.resourcemanager.servicelinker.models.VNetSolution; -import com.azure.resourcemanager.servicelinker.models.VNetSolutionType; -import com.azure.resourcemanager.servicelinker.models.ValueSecretInfo; -/** - * Samples for Linker CreateOrUpdate. - */ -public final class LinkerCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * PutLinker.json + * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/PutLink.json */ /** - * Sample code: PutLinker. + * Sample code: PutLink. * * @param manager Entry point to ServiceLinkerManager. */ - public static void putLinker(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { + public static void putLink(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { manager.linkers() .define("linkName") .withExistingResourceUri( @@ -455,7 +94,6 @@ public final class LinkerCreateOrUpdateSamples { "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DBforPostgreSQL/servers/test-pg/databases/test-db")) .withAuthInfo( new SecretAuthInfo().withName("name").withSecretInfo(new ValueSecretInfo().withValue("secret"))) - .withVNetSolution(new VNetSolution().withType(VNetSolutionType.SERVICE_ENDPOINT)) .create(); } } @@ -470,15 +108,14 @@ public final class LinkerCreateOrUpdateSamples { public final class LinkerDeleteSamples { /* * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * DeleteLinker.json + * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/DeleteLink.json */ /** - * Sample code: DeleteLinker. + * Sample code: DeleteLink. * * @param manager Entry point to ServiceLinkerManager. */ - public static void deleteLinker(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { + public static void deleteLink(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { manager.linkers() .delete( "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", @@ -496,15 +133,14 @@ public final class LinkerDeleteSamples { public final class LinkerGetSamples { /* * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/Linker. - * json + * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/Link.json */ /** - * Sample code: Linker. + * Sample code: Link. * * @param manager Entry point to ServiceLinkerManager. */ - public static void linker(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { + public static void link(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { manager.linkers() .getWithResponse( "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", @@ -522,15 +158,14 @@ public final class LinkerGetSamples { public final class LinkerListSamples { /* * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * LinkerList.json + * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/LinkList.json */ /** - * Sample code: LinkerList. + * Sample code: LinkList. * * @param manager Entry point to ServiceLinkerManager. */ - public static void linkerList(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { + public static void linkList(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { manager.linkers() .list( "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", @@ -548,8 +183,8 @@ public final class LinkerListSamples { public final class LinkerListConfigurationsSamples { /* * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * GetConfigurations.json + * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/GetConfigurations + * .json */ /** * Sample code: GetConfiguration. @@ -559,7 +194,7 @@ public final class LinkerListConfigurationsSamples { public static void getConfiguration(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { manager.linkers() .listConfigurationsWithResponse( - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.App/containerApps/test-app", + "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", "linkName", com.azure.core.util.Context.NONE); } } @@ -578,15 +213,14 @@ import com.azure.resourcemanager.servicelinker.models.ServicePrincipalSecretAuth public final class LinkerUpdateSamples { /* * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * PatchLinker.json + * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/PatchLink.json */ /** - * Sample code: PatchLinker. + * Sample code: PatchLink. * * @param manager Entry point to ServiceLinkerManager. */ - public static void patchLinker(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { + public static void patchLink(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { LinkerResource resource = manager.linkers() .getWithResponse( "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", @@ -612,15 +246,15 @@ public final class LinkerUpdateSamples { public final class LinkerValidateSamples { /* * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * ValidateLinkerSuccess.json + * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/ + * ValidateLinkSuccess.json */ /** - * Sample code: ValidateLinkerSuccess. + * Sample code: ValidateLinkSuccess. * * @param manager Entry point to ServiceLinkerManager. */ - public static void validateLinkerSuccess(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { + public static void validateLinkSuccess(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { manager.linkers() .validate( "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", @@ -629,230 +263,6 @@ public final class LinkerValidateSamples { } ``` -### LinkersOperation_CreateDryrun - -```java -import com.azure.resourcemanager.servicelinker.fluent.models.DryrunResourceInner; -import com.azure.resourcemanager.servicelinker.models.AzureResource; -import com.azure.resourcemanager.servicelinker.models.CreateOrUpdateDryrunParameters; -import com.azure.resourcemanager.servicelinker.models.SecretAuthInfo; -import com.azure.resourcemanager.servicelinker.models.ValueSecretInfo; - -/** - * Samples for LinkersOperation CreateDryrun. - */ -public final class LinkersOperationCreateDryrunSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * PutDryrun.json - */ - /** - * Sample code: PutDryrun. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void putDryrun(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.linkersOperations() - .createDryrun( - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", - "dryrunName", - new DryrunResourceInner().withParameters(new CreateOrUpdateDryrunParameters() - .withTargetService(new AzureResource().withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db")) - .withAuthInfo(new SecretAuthInfo().withName("name") - .withSecretInfo(new ValueSecretInfo().withValue("secret")))), - com.azure.core.util.Context.NONE); - } -} -``` - -### LinkersOperation_DeleteDryrun - -```java -/** - * Samples for LinkersOperation DeleteDryrun. - */ -public final class LinkersOperationDeleteDryrunSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * DeleteDryrun.json - */ - /** - * Sample code: DeleteDryrun. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void deleteDryrun(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.linkersOperations() - .deleteDryrunWithResponse( - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", - "dryrunName", com.azure.core.util.Context.NONE); - } -} -``` - -### LinkersOperation_GenerateConfigurations - -```java -import com.azure.resourcemanager.servicelinker.models.ConfigurationInfo; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for LinkersOperation GenerateConfigurations. - */ -public final class LinkersOperationGenerateConfigurationsSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * LinkerGenerateConfigurations.json - */ - /** - * Sample code: GenerateConfiguration. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void generateConfiguration(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.linkersOperations() - .generateConfigurationsWithResponse( - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", - "linkName", new ConfigurationInfo().withCustomizedKeys( - mapOf("ASL_DocumentDb_ConnectionString", "MyConnectionstring")), - com.azure.core.util.Context.NONE); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} -``` - -### LinkersOperation_GetDryrun - -```java -/** - * Samples for LinkersOperation GetDryrun. - */ -public final class LinkersOperationGetDryrunSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * GetDryrun.json - */ - /** - * Sample code: GetDryrun. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void getDryrun(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.linkersOperations() - .getDryrunWithResponse( - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", - "dryrunName", com.azure.core.util.Context.NONE); - } -} -``` - -### LinkersOperation_ListDaprConfigurations - -```java -/** - * Samples for LinkersOperation ListDaprConfigurations. - */ -public final class LinkersOperationListDaprConfigurationsSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * GetDaprConfigurations.json - */ - /** - * Sample code: GetDaprConfigurations. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void getDaprConfigurations(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.linkersOperations() - .listDaprConfigurations( - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", - com.azure.core.util.Context.NONE); - } -} -``` - -### LinkersOperation_ListDryrun - -```java -/** - * Samples for LinkersOperation ListDryrun. - */ -public final class LinkersOperationListDryrunSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * ListDryrun.json - */ - /** - * Sample code: ListDryrun. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void listDryrun(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.linkersOperations() - .listDryrun( - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", - com.azure.core.util.Context.NONE); - } -} -``` - -### LinkersOperation_UpdateDryrun - -```java -import com.azure.resourcemanager.servicelinker.models.AzureResource; -import com.azure.resourcemanager.servicelinker.models.CreateOrUpdateDryrunParameters; -import com.azure.resourcemanager.servicelinker.models.DryrunPatch; -import com.azure.resourcemanager.servicelinker.models.SecretAuthInfo; -import com.azure.resourcemanager.servicelinker.models.ValueSecretInfo; - -/** - * Samples for LinkersOperation UpdateDryrun. - */ -public final class LinkersOperationUpdateDryrunSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * PatchDryrun.json - */ - /** - * Sample code: PatchDryrun. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void patchDryrun(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.linkersOperations() - .updateDryrun( - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", - "dryrunName", - new DryrunPatch().withParameters(new CreateOrUpdateDryrunParameters() - .withTargetService(new AzureResource().withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db")) - .withAuthInfo(new SecretAuthInfo().withName("name") - .withSecretInfo(new ValueSecretInfo().withValue("secret")))), - com.azure.core.util.Context.NONE); - } -} -``` - ### Operations_List ```java @@ -862,8 +272,8 @@ public final class LinkersOperationUpdateDryrunSamples { public final class OperationsListSamples { /* * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * OperationsList.json + * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/OperationsList. + * json */ /** * Sample code: GetConfiguration. diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/pom.xml b/sdk/servicelinker/azure-resourcemanager-servicelinker/pom.xml index 28e5f1ac0435f..0ba2cbe94fde6 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/pom.xml +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/pom.xml @@ -14,11 +14,11 @@ com.azure.resourcemanager azure-resourcemanager-servicelinker - 1.0.0-beta.5 + 1.0.0 jar Microsoft Azure SDK for ServiceLinker Management - This package contains Microsoft Azure SDK for ServiceLinker Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft.ServiceLinker provider. Package tag package-2024-07-01-preview. + This package contains Microsoft Azure SDK for ServiceLinker Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft.ServiceLinker provider. Package tag package-2022-05-01. https://github.com/Azure/azure-sdk-for-java @@ -45,7 +45,7 @@ UTF-8 0 0 - true + false diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/ServiceLinkerManager.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/ServiceLinkerManager.java index c1131f8d620a8..d6f79d234af0b 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/ServiceLinkerManager.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/ServiceLinkerManager.java @@ -11,6 +11,7 @@ import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.BearerTokenAuthenticationPolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; @@ -19,21 +20,14 @@ import com.azure.core.http.policy.RetryOptions; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; import com.azure.core.management.profile.AzureProfile; import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.servicelinker.fluent.ServiceLinkerManagementClient; -import com.azure.resourcemanager.servicelinker.implementation.ConfigurationNamesOperationsImpl; -import com.azure.resourcemanager.servicelinker.implementation.ConnectorsImpl; import com.azure.resourcemanager.servicelinker.implementation.LinkersImpl; -import com.azure.resourcemanager.servicelinker.implementation.LinkersOperationsImpl; import com.azure.resourcemanager.servicelinker.implementation.OperationsImpl; import com.azure.resourcemanager.servicelinker.implementation.ServiceLinkerManagementClientBuilder; -import com.azure.resourcemanager.servicelinker.models.ConfigurationNamesOperations; -import com.azure.resourcemanager.servicelinker.models.Connectors; import com.azure.resourcemanager.servicelinker.models.Linkers; -import com.azure.resourcemanager.servicelinker.models.LinkersOperations; import com.azure.resourcemanager.servicelinker.models.Operations; import java.time.Duration; import java.time.temporal.ChronoUnit; @@ -47,16 +41,10 @@ * Microsoft.ServiceLinker provider. */ public final class ServiceLinkerManager { - private Connectors connectors; - private Linkers linkers; - private LinkersOperations linkersOperations; - private Operations operations; - private ConfigurationNamesOperations configurationNamesOperations; - private final ServiceLinkerManagementClient clientObject; private ServiceLinkerManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -220,7 +208,7 @@ public ServiceLinkerManager authenticate(TokenCredential credential, AzureProfil .append("-") .append("com.azure.resourcemanager.servicelinker") .append("/") - .append("1.0.0-beta.4"); + .append("1.0.0"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (") .append(Configuration.getGlobalConfiguration().get("java.version")) @@ -253,7 +241,7 @@ public ServiceLinkerManager authenticate(TokenCredential credential, AzureProfil HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); - policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); + policies.add(new BearerTokenAuthenticationPolicy(credential, scopes.toArray(new String[0]))); policies.addAll(this.policies.stream() .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) .collect(Collectors.toList())); @@ -266,18 +254,6 @@ public ServiceLinkerManager authenticate(TokenCredential credential, AzureProfil } } - /** - * Gets the resource collection API of Connectors. It manages DryrunResource. - * - * @return Resource collection API of Connectors. - */ - public Connectors connectors() { - if (this.connectors == null) { - this.connectors = new ConnectorsImpl(clientObject.getConnectors(), this); - } - return connectors; - } - /** * Gets the resource collection API of Linkers. It manages LinkerResource. * @@ -290,18 +266,6 @@ public Linkers linkers() { return linkers; } - /** - * Gets the resource collection API of LinkersOperations. - * - * @return Resource collection API of LinkersOperations. - */ - public LinkersOperations linkersOperations() { - if (this.linkersOperations == null) { - this.linkersOperations = new LinkersOperationsImpl(clientObject.getLinkersOperations(), this); - } - return linkersOperations; - } - /** * Gets the resource collection API of Operations. * @@ -314,19 +278,6 @@ public Operations operations() { return operations; } - /** - * Gets the resource collection API of ConfigurationNamesOperations. - * - * @return Resource collection API of ConfigurationNamesOperations. - */ - public ConfigurationNamesOperations configurationNamesOperations() { - if (this.configurationNamesOperations == null) { - this.configurationNamesOperations - = new ConfigurationNamesOperationsImpl(clientObject.getConfigurationNamesOperations(), this); - } - return configurationNamesOperations; - } - /** * Gets wrapped service client ServiceLinkerManagementClient providing direct access to the underlying * auto-generated API implementation, based on Azure REST API. diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/ConfigurationNamesOperationsClient.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/ConfigurationNamesOperationsClient.java deleted file mode 100644 index 31e6122c78a7c..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/ConfigurationNamesOperationsClient.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.servicelinker.fluent.models.ConfigurationNameItemInner; - -/** - * An instance of this class provides access to all the operations defined in ConfigurationNamesOperationsClient. - */ -public interface ConfigurationNamesOperationsClient { - /** - * Lists the configuration names generated by Service Connector for all target, client types, auth types. - * - * @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 configuration Name list which will be set based on different target resource, client type, auth type as - * paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Lists the configuration names generated by Service Connector for all target, client types, auth types. - * - * @param filter OData filter options. - * @param skipToken OData skipToken option for pagination. - * @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 configuration Name list which will be set based on different target resource, client type, auth type as - * paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String filter, String skipToken, Context context); -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/ConnectorsClient.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/ConnectorsClient.java deleted file mode 100644 index 585f772814b94..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/ConnectorsClient.java +++ /dev/null @@ -1,627 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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.servicelinker.fluent.models.ConfigurationResultInner; -import com.azure.resourcemanager.servicelinker.fluent.models.DryrunResourceInner; -import com.azure.resourcemanager.servicelinker.fluent.models.LinkerResourceInner; -import com.azure.resourcemanager.servicelinker.fluent.models.ValidateOperationResultInner; -import com.azure.resourcemanager.servicelinker.models.ConfigurationInfo; -import com.azure.resourcemanager.servicelinker.models.DryrunPatch; -import com.azure.resourcemanager.servicelinker.models.LinkerPatch; - -/** - * An instance of this class provides access to all the operations defined in ConnectorsClient. - */ -public interface ConnectorsClient { - /** - * list dryrun jobs. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @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 dryrun as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDryrun(String subscriptionId, String resourceGroupName, String location); - - /** - * list dryrun jobs. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @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 dryrun as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDryrun(String subscriptionId, String resourceGroupName, String location, - Context context); - - /** - * get a dryrun job. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @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 dryrun job along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getDryrunWithResponse(String subscriptionId, String resourceGroupName, - String location, String dryrunName, Context context); - - /** - * get a dryrun job. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @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 dryrun job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DryrunResourceInner getDryrun(String subscriptionId, String resourceGroupName, String location, String dryrunName); - - /** - * create a dryrun job to do necessary check before actual creation. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 {@link SyncPoller} for polling of a dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DryrunResourceInner> beginCreateDryrun(String subscriptionId, - String resourceGroupName, String location, String dryrunName, DryrunResourceInner parameters); - - /** - * create a dryrun job to do necessary check before actual creation. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 SyncPoller} for polling of a dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DryrunResourceInner> beginCreateDryrun(String subscriptionId, - String resourceGroupName, String location, String dryrunName, DryrunResourceInner parameters, Context context); - - /** - * create a dryrun job to do necessary check before actual creation. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DryrunResourceInner createDryrun(String subscriptionId, String resourceGroupName, String location, - String dryrunName, DryrunResourceInner parameters); - - /** - * create a dryrun job to do necessary check before actual creation. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DryrunResourceInner createDryrun(String subscriptionId, String resourceGroupName, String location, - String dryrunName, DryrunResourceInner parameters, Context context); - - /** - * update a dryrun job to do necessary check before actual creation. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 {@link SyncPoller} for polling of a dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DryrunResourceInner> beginUpdateDryrun(String subscriptionId, - String resourceGroupName, String location, String dryrunName, DryrunPatch parameters); - - /** - * update a dryrun job to do necessary check before actual creation. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 SyncPoller} for polling of a dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DryrunResourceInner> beginUpdateDryrun(String subscriptionId, - String resourceGroupName, String location, String dryrunName, DryrunPatch parameters, Context context); - - /** - * update a dryrun job to do necessary check before actual creation. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DryrunResourceInner updateDryrun(String subscriptionId, String resourceGroupName, String location, - String dryrunName, DryrunPatch parameters); - - /** - * update a dryrun job to do necessary check before actual creation. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DryrunResourceInner updateDryrun(String subscriptionId, String resourceGroupName, String location, - String dryrunName, DryrunPatch parameters, Context context); - - /** - * delete a dryrun job. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @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 deleteDryrunWithResponse(String subscriptionId, String resourceGroupName, String location, - String dryrunName, Context context); - - /** - * delete a dryrun job. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @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 deleteDryrun(String subscriptionId, String resourceGroupName, String location, String dryrunName); - - /** - * Returns list of connector which connects to the resource, which supports to config the target service during the - * resource provision. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @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 Linker as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String subscriptionId, String resourceGroupName, String location); - - /** - * Returns list of connector which connects to the resource, which supports to config the target service during the - * resource provision. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @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 Linker as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String subscriptionId, String resourceGroupName, String location, - Context context); - - /** - * Returns Connector resource for a given name. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 linker of source and target resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String subscriptionId, String resourceGroupName, String location, - String connectorName, Context context); - - /** - * Returns Connector resource for a given name. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 linker of source and target resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LinkerResourceInner get(String subscriptionId, String resourceGroupName, String location, String connectorName); - - /** - * Create or update Connector resource. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connector details. - * @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 linker of source and target resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LinkerResourceInner> beginCreateOrUpdate(String subscriptionId, - String resourceGroupName, String location, String connectorName, LinkerResourceInner parameters); - - /** - * Create or update Connector resource. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connector details. - * @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 linker of source and target resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LinkerResourceInner> beginCreateOrUpdate(String subscriptionId, - String resourceGroupName, String location, String connectorName, LinkerResourceInner parameters, - Context context); - - /** - * Create or update Connector resource. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connector details. - * @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 linker of source and target resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LinkerResourceInner createOrUpdate(String subscriptionId, String resourceGroupName, String location, - String connectorName, LinkerResourceInner parameters); - - /** - * Create or update Connector resource. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connector details. - * @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 linker of source and target resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LinkerResourceInner createOrUpdate(String subscriptionId, String resourceGroupName, String location, - String connectorName, LinkerResourceInner parameters, Context context); - - /** - * Delete a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String subscriptionId, String resourceGroupName, String location, - String connectorName); - - /** - * Delete a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String subscriptionId, String resourceGroupName, String location, - String connectorName, Context context); - - /** - * Delete a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 subscriptionId, String resourceGroupName, String location, String connectorName); - - /** - * Delete a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String subscriptionId, String resourceGroupName, String location, String connectorName, - Context context); - - /** - * Operation to update an existing Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connector details. - * @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 linker of source and target resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LinkerResourceInner> beginUpdate(String subscriptionId, - String resourceGroupName, String location, String connectorName, LinkerPatch parameters); - - /** - * Operation to update an existing Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connector details. - * @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 linker of source and target resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LinkerResourceInner> beginUpdate(String subscriptionId, - String resourceGroupName, String location, String connectorName, LinkerPatch parameters, Context context); - - /** - * Operation to update an existing Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connector details. - * @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 linker of source and target resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LinkerResourceInner update(String subscriptionId, String resourceGroupName, String location, String connectorName, - LinkerPatch parameters); - - /** - * Operation to update an existing Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connector details. - * @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 linker of source and target resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LinkerResourceInner update(String subscriptionId, String resourceGroupName, String location, String connectorName, - LinkerPatch parameters, Context context); - - /** - * Validate a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 {@link SyncPoller} for polling of the validation operation result for a Linker. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ValidateOperationResultInner> - beginValidate(String subscriptionId, String resourceGroupName, String location, String connectorName); - - /** - * Validate a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 SyncPoller} for polling of the validation operation result for a Linker. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ValidateOperationResultInner> beginValidate( - String subscriptionId, String resourceGroupName, String location, String connectorName, Context context); - - /** - * Validate a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 validation operation result for a Linker. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ValidateOperationResultInner validate(String subscriptionId, String resourceGroupName, String location, - String connectorName); - - /** - * Validate a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 validation operation result for a Linker. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ValidateOperationResultInner validate(String subscriptionId, String resourceGroupName, String location, - String connectorName, Context context); - - /** - * Generate configurations for a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connection Info, including format, secret store, etc. - * @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 configurations for source resource, include appSettings, connectionString and serviceBindings along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response generateConfigurationsWithResponse(String subscriptionId, - String resourceGroupName, String location, String connectorName, ConfigurationInfo parameters, Context context); - - /** - * Generate configurations for a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 configurations for source resource, include appSettings, connectionString and serviceBindings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ConfigurationResultInner generateConfigurations(String subscriptionId, String resourceGroupName, String location, - String connectorName); -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/LinkersClient.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/LinkersClient.java index cce268f096297..ddc3f19ad9e41 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/LinkersClient.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/LinkersClient.java @@ -11,8 +11,8 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.servicelinker.fluent.models.ConfigurationResultInner; import com.azure.resourcemanager.servicelinker.fluent.models.LinkerResourceInner; +import com.azure.resourcemanager.servicelinker.fluent.models.SourceConfigurationResultInner; import com.azure.resourcemanager.servicelinker.fluent.models.ValidateOperationResultInner; import com.azure.resourcemanager.servicelinker.models.LinkerPatch; @@ -21,8 +21,7 @@ */ public interface LinkersClient { /** - * Returns list of Linkers which connects to the resource. which supports to config both application and target - * service during the resource provision. + * Returns list of Linkers which connects to the resource. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -34,8 +33,7 @@ public interface LinkersClient { PagedIterable list(String resourceUri); /** - * Returns list of Linkers which connects to the resource. which supports to config both application and target - * service during the resource provision. + * Returns list of Linkers which connects to the resource. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param context The context to associate with this operation. @@ -75,7 +73,7 @@ public interface LinkersClient { LinkerResourceInner get(String resourceUri, String linkerName); /** - * Create or update Linker resource. + * Create or update linker resource. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -90,7 +88,7 @@ SyncPoller, LinkerResourceInner> beginCreateOrUp String linkerName, LinkerResourceInner parameters); /** - * Create or update Linker resource. + * Create or update linker resource. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -106,7 +104,7 @@ SyncPoller, LinkerResourceInner> beginCreateOrUp String linkerName, LinkerResourceInner parameters, Context context); /** - * Create or update Linker resource. + * Create or update linker resource. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -120,7 +118,7 @@ SyncPoller, LinkerResourceInner> beginCreateOrUp LinkerResourceInner createOrUpdate(String resourceUri, String linkerName, LinkerResourceInner parameters); /** - * Create or update Linker resource. + * Create or update linker resource. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -136,7 +134,7 @@ LinkerResourceInner createOrUpdate(String resourceUri, String linkerName, Linker Context context); /** - * Delete a Linker. + * Delete a link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -149,7 +147,7 @@ LinkerResourceInner createOrUpdate(String resourceUri, String linkerName, Linker SyncPoller, Void> beginDelete(String resourceUri, String linkerName); /** - * Delete a Linker. + * Delete a link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -163,7 +161,7 @@ LinkerResourceInner createOrUpdate(String resourceUri, String linkerName, Linker SyncPoller, Void> beginDelete(String resourceUri, String linkerName, Context context); /** - * Delete a Linker. + * Delete a link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -175,7 +173,7 @@ LinkerResourceInner createOrUpdate(String resourceUri, String linkerName, Linker void delete(String resourceUri, String linkerName); /** - * Delete a Linker. + * Delete a link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -188,7 +186,7 @@ LinkerResourceInner createOrUpdate(String resourceUri, String linkerName, Linker void delete(String resourceUri, String linkerName, Context context); /** - * Operation to update an existing Linker. + * Operation to update an existing link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -203,7 +201,7 @@ SyncPoller, LinkerResourceInner> beginUpdate(Str LinkerPatch parameters); /** - * Operation to update an existing Linker. + * Operation to update an existing link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -219,7 +217,7 @@ SyncPoller, LinkerResourceInner> beginUpdate(Str LinkerPatch parameters, Context context); /** - * Operation to update an existing Linker. + * Operation to update an existing link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -233,7 +231,7 @@ SyncPoller, LinkerResourceInner> beginUpdate(Str LinkerResourceInner update(String resourceUri, String linkerName, LinkerPatch parameters); /** - * Operation to update an existing Linker. + * Operation to update an existing link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -248,21 +246,21 @@ SyncPoller, LinkerResourceInner> beginUpdate(Str LinkerResourceInner update(String resourceUri, String linkerName, LinkerPatch parameters, Context context); /** - * Validate a Linker. + * Validate a link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker 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 {@link SyncPoller} for polling of the validation operation result for a Linker. + * @return the {@link SyncPoller} for polling of the validation operation result for a linker. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ValidateOperationResultInner> beginValidate(String resourceUri, String linkerName); /** - * Validate a Linker. + * Validate a link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -270,27 +268,27 @@ SyncPoller, ValidateOperationResultInne * @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 validation operation result for a Linker. + * @return the {@link SyncPoller} for polling of the validation operation result for a linker. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ValidateOperationResultInner> beginValidate(String resourceUri, String linkerName, Context context); /** - * Validate a Linker. + * Validate a link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker 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 validation operation result for a Linker. + * @return the validation operation result for a linker. */ @ServiceMethod(returns = ReturnType.SINGLE) ValidateOperationResultInner validate(String resourceUri, String linkerName); /** - * Validate a Linker. + * Validate a link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -298,13 +296,13 @@ SyncPoller, ValidateOperationResultInne * @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 validation operation result for a Linker. + * @return the validation operation result for a linker. */ @ServiceMethod(returns = ReturnType.SINGLE) ValidateOperationResultInner validate(String resourceUri, String linkerName, Context context); /** - * list source configurations for a Linker. + * list source configurations for a linker. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -316,11 +314,11 @@ SyncPoller, ValidateOperationResultInne * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listConfigurationsWithResponse(String resourceUri, String linkerName, + Response listConfigurationsWithResponse(String resourceUri, String linkerName, Context context); /** - * list source configurations for a Linker. + * list source configurations for a linker. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -330,5 +328,5 @@ Response listConfigurationsWithResponse(String resourc * @return configurations for source resource, include appSettings, connectionString and serviceBindings. */ @ServiceMethod(returns = ReturnType.SINGLE) - ConfigurationResultInner listConfigurations(String resourceUri, String linkerName); + SourceConfigurationResultInner listConfigurations(String resourceUri, String linkerName); } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/LinkersOperationsClient.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/LinkersOperationsClient.java deleted file mode 100644 index 306148bcbc411..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/LinkersOperationsClient.java +++ /dev/null @@ -1,277 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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.servicelinker.fluent.models.ConfigurationResultInner; -import com.azure.resourcemanager.servicelinker.fluent.models.DaprConfigurationResourceInner; -import com.azure.resourcemanager.servicelinker.fluent.models.DryrunResourceInner; -import com.azure.resourcemanager.servicelinker.models.ConfigurationInfo; -import com.azure.resourcemanager.servicelinker.models.DryrunPatch; - -/** - * An instance of this class provides access to all the operations defined in LinkersOperationsClient. - */ -public interface LinkersOperationsClient { - /** - * list dryrun jobs. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @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 dryrun as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDryrun(String resourceUri); - - /** - * list dryrun jobs. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @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 dryrun as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDryrun(String resourceUri, Context context); - - /** - * get a dryrun job. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @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 dryrun job along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getDryrunWithResponse(String resourceUri, String dryrunName, Context context); - - /** - * get a dryrun job. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @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 dryrun job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DryrunResourceInner getDryrun(String resourceUri, String dryrunName); - - /** - * create a dryrun job to do necessary check before actual creation. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 {@link SyncPoller} for polling of a dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DryrunResourceInner> beginCreateDryrun(String resourceUri, - String dryrunName, DryrunResourceInner parameters); - - /** - * create a dryrun job to do necessary check before actual creation. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 SyncPoller} for polling of a dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DryrunResourceInner> beginCreateDryrun(String resourceUri, - String dryrunName, DryrunResourceInner parameters, Context context); - - /** - * create a dryrun job to do necessary check before actual creation. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DryrunResourceInner createDryrun(String resourceUri, String dryrunName, DryrunResourceInner parameters); - - /** - * create a dryrun job to do necessary check before actual creation. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DryrunResourceInner createDryrun(String resourceUri, String dryrunName, DryrunResourceInner parameters, - Context context); - - /** - * add a dryrun job to do necessary check before actual creation. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 {@link SyncPoller} for polling of a dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DryrunResourceInner> beginUpdateDryrun(String resourceUri, - String dryrunName, DryrunPatch parameters); - - /** - * add a dryrun job to do necessary check before actual creation. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 SyncPoller} for polling of a dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DryrunResourceInner> beginUpdateDryrun(String resourceUri, - String dryrunName, DryrunPatch parameters, Context context); - - /** - * add a dryrun job to do necessary check before actual creation. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DryrunResourceInner updateDryrun(String resourceUri, String dryrunName, DryrunPatch parameters); - - /** - * add a dryrun job to do necessary check before actual creation. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DryrunResourceInner updateDryrun(String resourceUri, String dryrunName, DryrunPatch parameters, Context context); - - /** - * delete a dryrun job. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @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 deleteDryrunWithResponse(String resourceUri, String dryrunName, Context context); - - /** - * delete a dryrun job. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @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 deleteDryrun(String resourceUri, String dryrunName); - - /** - * Generate configurations for a Linker. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param linkerName The name Linker resource. - * @param parameters Connection Info, including format, secret store, etc. - * @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 configurations for source resource, include appSettings, connectionString and serviceBindings along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response generateConfigurationsWithResponse(String resourceUri, String linkerName, - ConfigurationInfo parameters, Context context); - - /** - * Generate configurations for a Linker. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param linkerName The name Linker 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 configurations for source resource, include appSettings, connectionString and serviceBindings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ConfigurationResultInner generateConfigurations(String resourceUri, String linkerName); - - /** - * List the dapr configuration supported by Service Connector. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @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 dapr configuration list supported by Service Connector as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDaprConfigurations(String resourceUri); - - /** - * List the dapr configuration supported by Service Connector. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @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 dapr configuration list supported by Service Connector as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDaprConfigurations(String resourceUri, Context context); -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/ServiceLinkerManagementClient.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/ServiceLinkerManagementClient.java index 6fb54e8262e7e..0b8c276b74985 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/ServiceLinkerManagementClient.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/ServiceLinkerManagementClient.java @@ -39,13 +39,6 @@ public interface ServiceLinkerManagementClient { */ Duration getDefaultPollInterval(); - /** - * Gets the ConnectorsClient object to access its operations. - * - * @return the ConnectorsClient object. - */ - ConnectorsClient getConnectors(); - /** * Gets the LinkersClient object to access its operations. * @@ -53,24 +46,10 @@ public interface ServiceLinkerManagementClient { */ LinkersClient getLinkers(); - /** - * Gets the LinkersOperationsClient object to access its operations. - * - * @return the LinkersOperationsClient object. - */ - LinkersOperationsClient getLinkersOperations(); - /** * Gets the OperationsClient object to access its operations. * * @return the OperationsClient object. */ OperationsClient getOperations(); - - /** - * Gets the ConfigurationNamesOperationsClient object to access its operations. - * - * @return the ConfigurationNamesOperationsClient object. - */ - ConfigurationNamesOperationsClient getConfigurationNamesOperations(); } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/ConfigurationNameItemInner.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/ConfigurationNameItemInner.java deleted file mode 100644 index 836ce6357c510..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/ConfigurationNameItemInner.java +++ /dev/null @@ -1,231 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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.servicelinker.models.AuthType; -import com.azure.resourcemanager.servicelinker.models.ClientType; -import com.azure.resourcemanager.servicelinker.models.ConfigurationName; -import com.azure.resourcemanager.servicelinker.models.DaprProperties; -import com.azure.resourcemanager.servicelinker.models.SecretSourceType; -import java.io.IOException; -import java.util.List; - -/** - * The ConfigurationNameItem model. - */ -@Fluent -public final class ConfigurationNameItemInner implements JsonSerializable { - /* - * The result detail. - */ - private ConfigurationNames innerProperties; - - /** - * Creates an instance of ConfigurationNameItemInner class. - */ - public ConfigurationNameItemInner() { - } - - /** - * Get the innerProperties property: The result detail. - * - * @return the innerProperties value. - */ - private ConfigurationNames innerProperties() { - return this.innerProperties; - } - - /** - * Get the targetService property: The target service provider name and resource name. - * - * @return the targetService value. - */ - public String targetService() { - return this.innerProperties() == null ? null : this.innerProperties().targetService(); - } - - /** - * Set the targetService property: The target service provider name and resource name. - * - * @param targetService the targetService value to set. - * @return the ConfigurationNameItemInner object itself. - */ - public ConfigurationNameItemInner withTargetService(String targetService) { - if (this.innerProperties() == null) { - this.innerProperties = new ConfigurationNames(); - } - this.innerProperties().withTargetService(targetService); - return this; - } - - /** - * Get the clientType property: The client type for configuration names. - * - * @return the clientType value. - */ - public ClientType clientType() { - return this.innerProperties() == null ? null : this.innerProperties().clientType(); - } - - /** - * Set the clientType property: The client type for configuration names. - * - * @param clientType the clientType value to set. - * @return the ConfigurationNameItemInner object itself. - */ - public ConfigurationNameItemInner withClientType(ClientType clientType) { - if (this.innerProperties() == null) { - this.innerProperties = new ConfigurationNames(); - } - this.innerProperties().withClientType(clientType); - return this; - } - - /** - * Get the authType property: The auth type. - * - * @return the authType value. - */ - public AuthType authType() { - return this.innerProperties() == null ? null : this.innerProperties().authType(); - } - - /** - * Set the authType property: The auth type. - * - * @param authType the authType value to set. - * @return the ConfigurationNameItemInner object itself. - */ - public ConfigurationNameItemInner withAuthType(AuthType authType) { - if (this.innerProperties() == null) { - this.innerProperties = new ConfigurationNames(); - } - this.innerProperties().withAuthType(authType); - return this; - } - - /** - * Get the secretType property: Indicates where the secrets in configuration from. Used when secrets are from - * Keyvault. - * - * @return the secretType value. - */ - public SecretSourceType secretType() { - return this.innerProperties() == null ? null : this.innerProperties().secretType(); - } - - /** - * Set the secretType property: Indicates where the secrets in configuration from. Used when secrets are from - * Keyvault. - * - * @param secretType the secretType value to set. - * @return the ConfigurationNameItemInner object itself. - */ - public ConfigurationNameItemInner withSecretType(SecretSourceType secretType) { - if (this.innerProperties() == null) { - this.innerProperties = new ConfigurationNames(); - } - this.innerProperties().withSecretType(secretType); - return this; - } - - /** - * Get the daprProperties property: Deprecated, please use #/definitions/DaprConfigurationList instead. - * - * @return the daprProperties value. - */ - public DaprProperties daprProperties() { - return this.innerProperties() == null ? null : this.innerProperties().daprProperties(); - } - - /** - * Set the daprProperties property: Deprecated, please use #/definitions/DaprConfigurationList instead. - * - * @param daprProperties the daprProperties value to set. - * @return the ConfigurationNameItemInner object itself. - */ - public ConfigurationNameItemInner withDaprProperties(DaprProperties daprProperties) { - if (this.innerProperties() == null) { - this.innerProperties = new ConfigurationNames(); - } - this.innerProperties().withDaprProperties(daprProperties); - return this; - } - - /** - * Get the names property: The configuration names to be set in compute service environment. - * - * @return the names value. - */ - public List names() { - return this.innerProperties() == null ? null : this.innerProperties().names(); - } - - /** - * Set the names property: The configuration names to be set in compute service environment. - * - * @param names the names value to set. - * @return the ConfigurationNameItemInner object itself. - */ - public ConfigurationNameItemInner withNames(List names) { - if (this.innerProperties() == null) { - this.innerProperties = new ConfigurationNames(); - } - this.innerProperties().withNames(names); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ConfigurationNameItemInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ConfigurationNameItemInner 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 ConfigurationNameItemInner. - */ - public static ConfigurationNameItemInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ConfigurationNameItemInner deserializedConfigurationNameItemInner = new ConfigurationNameItemInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedConfigurationNameItemInner.innerProperties = ConfigurationNames.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedConfigurationNameItemInner; - }); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/ConfigurationNames.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/ConfigurationNames.java deleted file mode 100644 index 35456d014a3e2..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/ConfigurationNames.java +++ /dev/null @@ -1,248 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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.servicelinker.models.AuthType; -import com.azure.resourcemanager.servicelinker.models.ClientType; -import com.azure.resourcemanager.servicelinker.models.ConfigurationName; -import com.azure.resourcemanager.servicelinker.models.DaprProperties; -import com.azure.resourcemanager.servicelinker.models.SecretSourceType; -import java.io.IOException; -import java.util.List; - -/** - * The configuration names which will be set based on specific target resource, client type, auth type. - */ -@Fluent -public final class ConfigurationNames implements JsonSerializable { - /* - * The target service provider name and resource name. - */ - private String targetService; - - /* - * The client type for configuration names. - */ - private ClientType clientType; - - /* - * The auth type. - */ - private AuthType authType; - - /* - * Indicates where the secrets in configuration from. Used when secrets are from Keyvault. - */ - private SecretSourceType secretType; - - /* - * Deprecated, please use #/definitions/DaprConfigurationList instead - */ - private DaprProperties daprProperties; - - /* - * The configuration names to be set in compute service environment. - */ - private List names; - - /** - * Creates an instance of ConfigurationNames class. - */ - public ConfigurationNames() { - } - - /** - * Get the targetService property: The target service provider name and resource name. - * - * @return the targetService value. - */ - public String targetService() { - return this.targetService; - } - - /** - * Set the targetService property: The target service provider name and resource name. - * - * @param targetService the targetService value to set. - * @return the ConfigurationNames object itself. - */ - public ConfigurationNames withTargetService(String targetService) { - this.targetService = targetService; - return this; - } - - /** - * Get the clientType property: The client type for configuration names. - * - * @return the clientType value. - */ - public ClientType clientType() { - return this.clientType; - } - - /** - * Set the clientType property: The client type for configuration names. - * - * @param clientType the clientType value to set. - * @return the ConfigurationNames object itself. - */ - public ConfigurationNames withClientType(ClientType clientType) { - this.clientType = clientType; - return this; - } - - /** - * Get the authType property: The auth type. - * - * @return the authType value. - */ - public AuthType authType() { - return this.authType; - } - - /** - * Set the authType property: The auth type. - * - * @param authType the authType value to set. - * @return the ConfigurationNames object itself. - */ - public ConfigurationNames withAuthType(AuthType authType) { - this.authType = authType; - return this; - } - - /** - * Get the secretType property: Indicates where the secrets in configuration from. Used when secrets are from - * Keyvault. - * - * @return the secretType value. - */ - public SecretSourceType secretType() { - return this.secretType; - } - - /** - * Set the secretType property: Indicates where the secrets in configuration from. Used when secrets are from - * Keyvault. - * - * @param secretType the secretType value to set. - * @return the ConfigurationNames object itself. - */ - public ConfigurationNames withSecretType(SecretSourceType secretType) { - this.secretType = secretType; - return this; - } - - /** - * Get the daprProperties property: Deprecated, please use #/definitions/DaprConfigurationList instead. - * - * @return the daprProperties value. - */ - public DaprProperties daprProperties() { - return this.daprProperties; - } - - /** - * Set the daprProperties property: Deprecated, please use #/definitions/DaprConfigurationList instead. - * - * @param daprProperties the daprProperties value to set. - * @return the ConfigurationNames object itself. - */ - public ConfigurationNames withDaprProperties(DaprProperties daprProperties) { - this.daprProperties = daprProperties; - return this; - } - - /** - * Get the names property: The configuration names to be set in compute service environment. - * - * @return the names value. - */ - public List names() { - return this.names; - } - - /** - * Set the names property: The configuration names to be set in compute service environment. - * - * @param names the names value to set. - * @return the ConfigurationNames object itself. - */ - public ConfigurationNames withNames(List names) { - this.names = names; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (daprProperties() != null) { - daprProperties().validate(); - } - if (names() != null) { - names().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("targetService", this.targetService); - jsonWriter.writeStringField("clientType", this.clientType == null ? null : this.clientType.toString()); - jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); - jsonWriter.writeStringField("secretType", this.secretType == null ? null : this.secretType.toString()); - jsonWriter.writeJsonField("daprProperties", this.daprProperties); - jsonWriter.writeArrayField("names", this.names, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ConfigurationNames from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ConfigurationNames 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 ConfigurationNames. - */ - public static ConfigurationNames fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ConfigurationNames deserializedConfigurationNames = new ConfigurationNames(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("targetService".equals(fieldName)) { - deserializedConfigurationNames.targetService = reader.getString(); - } else if ("clientType".equals(fieldName)) { - deserializedConfigurationNames.clientType = ClientType.fromString(reader.getString()); - } else if ("authType".equals(fieldName)) { - deserializedConfigurationNames.authType = AuthType.fromString(reader.getString()); - } else if ("secretType".equals(fieldName)) { - deserializedConfigurationNames.secretType = SecretSourceType.fromString(reader.getString()); - } else if ("daprProperties".equals(fieldName)) { - deserializedConfigurationNames.daprProperties = DaprProperties.fromJson(reader); - } else if ("names".equals(fieldName)) { - List names = reader.readArray(reader1 -> ConfigurationName.fromJson(reader1)); - deserializedConfigurationNames.names = names; - } else { - reader.skipChildren(); - } - } - - return deserializedConfigurationNames; - }); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/DaprConfigurationProperties.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/DaprConfigurationProperties.java deleted file mode 100644 index 085e1b4a4ae8f..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/DaprConfigurationProperties.java +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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.servicelinker.models.AuthType; -import com.azure.resourcemanager.servicelinker.models.DaprProperties; -import java.io.IOException; - -/** - * The DaprConfigurationProperties model. - */ -@Fluent -public final class DaprConfigurationProperties implements JsonSerializable { - /* - * Supported target resource type, extract from resource id, uppercase - */ - private String targetType; - - /* - * The authentication type. - */ - private AuthType authType; - - /* - * Indicates some additional properties for dapr client type - */ - private DaprProperties daprProperties; - - /** - * Creates an instance of DaprConfigurationProperties class. - */ - public DaprConfigurationProperties() { - } - - /** - * Get the targetType property: Supported target resource type, extract from resource id, uppercase. - * - * @return the targetType value. - */ - public String targetType() { - return this.targetType; - } - - /** - * Set the targetType property: Supported target resource type, extract from resource id, uppercase. - * - * @param targetType the targetType value to set. - * @return the DaprConfigurationProperties object itself. - */ - public DaprConfigurationProperties withTargetType(String targetType) { - this.targetType = targetType; - return this; - } - - /** - * Get the authType property: The authentication type. - * - * @return the authType value. - */ - public AuthType authType() { - return this.authType; - } - - /** - * Set the authType property: The authentication type. - * - * @param authType the authType value to set. - * @return the DaprConfigurationProperties object itself. - */ - public DaprConfigurationProperties withAuthType(AuthType authType) { - this.authType = authType; - return this; - } - - /** - * Get the daprProperties property: Indicates some additional properties for dapr client type. - * - * @return the daprProperties value. - */ - public DaprProperties daprProperties() { - return this.daprProperties; - } - - /** - * Set the daprProperties property: Indicates some additional properties for dapr client type. - * - * @param daprProperties the daprProperties value to set. - * @return the DaprConfigurationProperties object itself. - */ - public DaprConfigurationProperties withDaprProperties(DaprProperties daprProperties) { - this.daprProperties = daprProperties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (daprProperties() != null) { - daprProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("targetType", this.targetType); - jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); - jsonWriter.writeJsonField("daprProperties", this.daprProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprConfigurationProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprConfigurationProperties 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 DaprConfigurationProperties. - */ - public static DaprConfigurationProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprConfigurationProperties deserializedDaprConfigurationProperties = new DaprConfigurationProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("targetType".equals(fieldName)) { - deserializedDaprConfigurationProperties.targetType = reader.getString(); - } else if ("authType".equals(fieldName)) { - deserializedDaprConfigurationProperties.authType = AuthType.fromString(reader.getString()); - } else if ("daprProperties".equals(fieldName)) { - deserializedDaprConfigurationProperties.daprProperties = DaprProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprConfigurationProperties; - }); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/DaprConfigurationResourceInner.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/DaprConfigurationResourceInner.java deleted file mode 100644 index 12ba3d2d49489..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/DaprConfigurationResourceInner.java +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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.servicelinker.models.AuthType; -import com.azure.resourcemanager.servicelinker.models.DaprProperties; -import java.io.IOException; - -/** - * Represent one resource of the dapr configuration list. - */ -@Fluent -public final class DaprConfigurationResourceInner implements JsonSerializable { - /* - * The properties of the dapr configuration. - */ - private DaprConfigurationProperties innerProperties; - - /** - * Creates an instance of DaprConfigurationResourceInner class. - */ - public DaprConfigurationResourceInner() { - } - - /** - * Get the innerProperties property: The properties of the dapr configuration. - * - * @return the innerProperties value. - */ - private DaprConfigurationProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the targetType property: Supported target resource type, extract from resource id, uppercase. - * - * @return the targetType value. - */ - public String targetType() { - return this.innerProperties() == null ? null : this.innerProperties().targetType(); - } - - /** - * Set the targetType property: Supported target resource type, extract from resource id, uppercase. - * - * @param targetType the targetType value to set. - * @return the DaprConfigurationResourceInner object itself. - */ - public DaprConfigurationResourceInner withTargetType(String targetType) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprConfigurationProperties(); - } - this.innerProperties().withTargetType(targetType); - return this; - } - - /** - * Get the authType property: The authentication type. - * - * @return the authType value. - */ - public AuthType authType() { - return this.innerProperties() == null ? null : this.innerProperties().authType(); - } - - /** - * Set the authType property: The authentication type. - * - * @param authType the authType value to set. - * @return the DaprConfigurationResourceInner object itself. - */ - public DaprConfigurationResourceInner withAuthType(AuthType authType) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprConfigurationProperties(); - } - this.innerProperties().withAuthType(authType); - return this; - } - - /** - * Get the daprProperties property: Indicates some additional properties for dapr client type. - * - * @return the daprProperties value. - */ - public DaprProperties daprProperties() { - return this.innerProperties() == null ? null : this.innerProperties().daprProperties(); - } - - /** - * Set the daprProperties property: Indicates some additional properties for dapr client type. - * - * @param daprProperties the daprProperties value to set. - * @return the DaprConfigurationResourceInner object itself. - */ - public DaprConfigurationResourceInner withDaprProperties(DaprProperties daprProperties) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprConfigurationProperties(); - } - this.innerProperties().withDaprProperties(daprProperties); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprConfigurationResourceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprConfigurationResourceInner 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 DaprConfigurationResourceInner. - */ - public static DaprConfigurationResourceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprConfigurationResourceInner deserializedDaprConfigurationResourceInner - = new DaprConfigurationResourceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedDaprConfigurationResourceInner.innerProperties - = DaprConfigurationProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprConfigurationResourceInner; - }); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/DryrunProperties.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/DryrunProperties.java deleted file mode 100644 index d00847ce46c88..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/DryrunProperties.java +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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.servicelinker.models.DryrunOperationPreview; -import com.azure.resourcemanager.servicelinker.models.DryrunParameters; -import com.azure.resourcemanager.servicelinker.models.DryrunPrerequisiteResult; -import java.io.IOException; -import java.util.List; - -/** - * The properties of the dryrun job. - */ -@Fluent -public final class DryrunProperties implements JsonSerializable { - /* - * The parameters of the dryrun - */ - private DryrunParameters parameters; - - /* - * the result of the dryrun - */ - private List prerequisiteResults; - - /* - * the preview of the operations for creation - */ - private List operationPreviews; - - /* - * The provisioning state. - */ - private String provisioningState; - - /** - * Creates an instance of DryrunProperties class. - */ - public DryrunProperties() { - } - - /** - * Get the parameters property: The parameters of the dryrun. - * - * @return the parameters value. - */ - public DryrunParameters parameters() { - return this.parameters; - } - - /** - * Set the parameters property: The parameters of the dryrun. - * - * @param parameters the parameters value to set. - * @return the DryrunProperties object itself. - */ - public DryrunProperties withParameters(DryrunParameters parameters) { - this.parameters = parameters; - return this; - } - - /** - * Get the prerequisiteResults property: the result of the dryrun. - * - * @return the prerequisiteResults value. - */ - public List prerequisiteResults() { - return this.prerequisiteResults; - } - - /** - * Get the operationPreviews property: the preview of the operations for creation. - * - * @return the operationPreviews value. - */ - public List operationPreviews() { - return this.operationPreviews; - } - - /** - * Get the provisioningState property: The provisioning state. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (parameters() != null) { - parameters().validate(); - } - if (prerequisiteResults() != null) { - prerequisiteResults().forEach(e -> e.validate()); - } - if (operationPreviews() != null) { - operationPreviews().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("parameters", this.parameters); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DryrunProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DryrunProperties 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 DryrunProperties. - */ - public static DryrunProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DryrunProperties deserializedDryrunProperties = new DryrunProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("parameters".equals(fieldName)) { - deserializedDryrunProperties.parameters = DryrunParameters.fromJson(reader); - } else if ("prerequisiteResults".equals(fieldName)) { - List prerequisiteResults - = reader.readArray(reader1 -> DryrunPrerequisiteResult.fromJson(reader1)); - deserializedDryrunProperties.prerequisiteResults = prerequisiteResults; - } else if ("operationPreviews".equals(fieldName)) { - List operationPreviews - = reader.readArray(reader1 -> DryrunOperationPreview.fromJson(reader1)); - deserializedDryrunProperties.operationPreviews = operationPreviews; - } else if ("provisioningState".equals(fieldName)) { - deserializedDryrunProperties.provisioningState = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDryrunProperties; - }); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/DryrunResourceInner.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/DryrunResourceInner.java deleted file mode 100644 index 863e9e4d8f34d..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/DryrunResourceInner.java +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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.servicelinker.models.DryrunOperationPreview; -import com.azure.resourcemanager.servicelinker.models.DryrunParameters; -import com.azure.resourcemanager.servicelinker.models.DryrunPrerequisiteResult; -import java.io.IOException; -import java.util.List; - -/** - * a dryrun job resource. - */ -@Fluent -public final class DryrunResourceInner extends ProxyResource { - /* - * The properties of the dryrun job. - */ - private DryrunProperties 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 DryrunResourceInner class. - */ - public DryrunResourceInner() { - } - - /** - * Get the innerProperties property: The properties of the dryrun job. - * - * @return the innerProperties value. - */ - private DryrunProperties 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 parameters property: The parameters of the dryrun. - * - * @return the parameters value. - */ - public DryrunParameters parameters() { - return this.innerProperties() == null ? null : this.innerProperties().parameters(); - } - - /** - * Set the parameters property: The parameters of the dryrun. - * - * @param parameters the parameters value to set. - * @return the DryrunResourceInner object itself. - */ - public DryrunResourceInner withParameters(DryrunParameters parameters) { - if (this.innerProperties() == null) { - this.innerProperties = new DryrunProperties(); - } - this.innerProperties().withParameters(parameters); - return this; - } - - /** - * Get the prerequisiteResults property: the result of the dryrun. - * - * @return the prerequisiteResults value. - */ - public List prerequisiteResults() { - return this.innerProperties() == null ? null : this.innerProperties().prerequisiteResults(); - } - - /** - * Get the operationPreviews property: the preview of the operations for creation. - * - * @return the operationPreviews value. - */ - public List operationPreviews() { - return this.innerProperties() == null ? null : this.innerProperties().operationPreviews(); - } - - /** - * Get the provisioningState property: The provisioning state. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DryrunResourceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DryrunResourceInner 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 DryrunResourceInner. - */ - public static DryrunResourceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DryrunResourceInner deserializedDryrunResourceInner = new DryrunResourceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedDryrunResourceInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedDryrunResourceInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedDryrunResourceInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedDryrunResourceInner.innerProperties = DryrunProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedDryrunResourceInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDryrunResourceInner; - }); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/LinkerProperties.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/LinkerProperties.java index d87eca60a2c1a..84d04089000ae 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/LinkerProperties.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/LinkerProperties.java @@ -11,18 +11,16 @@ import com.azure.json.JsonWriter; import com.azure.resourcemanager.servicelinker.models.AuthInfoBase; import com.azure.resourcemanager.servicelinker.models.ClientType; -import com.azure.resourcemanager.servicelinker.models.ConfigurationInfo; -import com.azure.resourcemanager.servicelinker.models.PublicNetworkSolution; import com.azure.resourcemanager.servicelinker.models.SecretStore; import com.azure.resourcemanager.servicelinker.models.TargetServiceBase; import com.azure.resourcemanager.servicelinker.models.VNetSolution; import java.io.IOException; /** - * The properties of the Linker. + * The properties of the linker. */ @Fluent -public class LinkerProperties implements JsonSerializable { +public final class LinkerProperties implements JsonSerializable { /* * The target service properties */ @@ -58,16 +56,6 @@ public class LinkerProperties implements JsonSerializable { */ private String scope; - /* - * The network solution. - */ - private PublicNetworkSolution publicNetworkSolution; - - /* - * The connection information consumed by applications, including secrets, connection strings. - */ - private ConfigurationInfo configurationInfo; - /** * Creates an instance of LinkerProperties class. */ @@ -143,17 +131,6 @@ public String provisioningState() { return this.provisioningState; } - /** - * Set the provisioningState property: The provisioning state. - * - * @param provisioningState the provisioningState value to set. - * @return the LinkerProperties object itself. - */ - LinkerProperties withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - /** * Get the vNetSolution property: The VNet solution. * @@ -214,48 +191,6 @@ public LinkerProperties withScope(String scope) { return this; } - /** - * Get the publicNetworkSolution property: The network solution. - * - * @return the publicNetworkSolution value. - */ - public PublicNetworkSolution publicNetworkSolution() { - return this.publicNetworkSolution; - } - - /** - * Set the publicNetworkSolution property: The network solution. - * - * @param publicNetworkSolution the publicNetworkSolution value to set. - * @return the LinkerProperties object itself. - */ - public LinkerProperties withPublicNetworkSolution(PublicNetworkSolution publicNetworkSolution) { - this.publicNetworkSolution = publicNetworkSolution; - return this; - } - - /** - * Get the configurationInfo property: The connection information consumed by applications, including secrets, - * connection strings. - * - * @return the configurationInfo value. - */ - public ConfigurationInfo configurationInfo() { - return this.configurationInfo; - } - - /** - * Set the configurationInfo property: The connection information consumed by applications, including secrets, - * connection strings. - * - * @param configurationInfo the configurationInfo value to set. - * @return the LinkerProperties object itself. - */ - public LinkerProperties withConfigurationInfo(ConfigurationInfo configurationInfo) { - this.configurationInfo = configurationInfo; - return this; - } - /** * Validates the instance. * @@ -274,12 +209,6 @@ public void validate() { if (secretStore() != null) { secretStore().validate(); } - if (publicNetworkSolution() != null) { - publicNetworkSolution().validate(); - } - if (configurationInfo() != null) { - configurationInfo().validate(); - } } /** @@ -294,8 +223,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("vNetSolution", this.vNetSolution); jsonWriter.writeJsonField("secretStore", this.secretStore); jsonWriter.writeStringField("scope", this.scope); - jsonWriter.writeJsonField("publicNetworkSolution", this.publicNetworkSolution); - jsonWriter.writeJsonField("configurationInfo", this.configurationInfo); return jsonWriter.writeEndObject(); } @@ -328,10 +255,6 @@ public static LinkerProperties fromJson(JsonReader jsonReader) throws IOExceptio deserializedLinkerProperties.secretStore = SecretStore.fromJson(reader); } else if ("scope".equals(fieldName)) { deserializedLinkerProperties.scope = reader.getString(); - } else if ("publicNetworkSolution".equals(fieldName)) { - deserializedLinkerProperties.publicNetworkSolution = PublicNetworkSolution.fromJson(reader); - } else if ("configurationInfo".equals(fieldName)) { - deserializedLinkerProperties.configurationInfo = ConfigurationInfo.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/LinkerResourceInner.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/LinkerResourceInner.java index 99ec1f9f0c606..0ddbf62d011d7 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/LinkerResourceInner.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/LinkerResourceInner.java @@ -13,8 +13,6 @@ import com.azure.json.JsonWriter; import com.azure.resourcemanager.servicelinker.models.AuthInfoBase; import com.azure.resourcemanager.servicelinker.models.ClientType; -import com.azure.resourcemanager.servicelinker.models.ConfigurationInfo; -import com.azure.resourcemanager.servicelinker.models.PublicNetworkSolution; import com.azure.resourcemanager.servicelinker.models.SecretStore; import com.azure.resourcemanager.servicelinker.models.TargetServiceBase; import com.azure.resourcemanager.servicelinker.models.VNetSolution; @@ -26,12 +24,12 @@ @Fluent public final class LinkerResourceInner extends ProxyResource { /* - * The properties of the Linker. + * The properties of the linker. */ private LinkerProperties innerProperties = new LinkerProperties(); /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. + * The system data. */ private SystemData systemData; @@ -57,7 +55,7 @@ public LinkerResourceInner() { } /** - * Get the innerProperties property: The properties of the Linker. + * Get the innerProperties property: The properties of the linker. * * @return the innerProperties value. */ @@ -66,7 +64,7 @@ private LinkerProperties innerProperties() { } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Get the systemData property: The system data. * * @return the systemData value. */ @@ -251,54 +249,6 @@ public LinkerResourceInner withScope(String scope) { return this; } - /** - * Get the publicNetworkSolution property: The network solution. - * - * @return the publicNetworkSolution value. - */ - public PublicNetworkSolution publicNetworkSolution() { - return this.innerProperties() == null ? null : this.innerProperties().publicNetworkSolution(); - } - - /** - * Set the publicNetworkSolution property: The network solution. - * - * @param publicNetworkSolution the publicNetworkSolution value to set. - * @return the LinkerResourceInner object itself. - */ - public LinkerResourceInner withPublicNetworkSolution(PublicNetworkSolution publicNetworkSolution) { - if (this.innerProperties() == null) { - this.innerProperties = new LinkerProperties(); - } - this.innerProperties().withPublicNetworkSolution(publicNetworkSolution); - return this; - } - - /** - * Get the configurationInfo property: The connection information consumed by applications, including secrets, - * connection strings. - * - * @return the configurationInfo value. - */ - public ConfigurationInfo configurationInfo() { - return this.innerProperties() == null ? null : this.innerProperties().configurationInfo(); - } - - /** - * Set the configurationInfo property: The connection information consumed by applications, including secrets, - * connection strings. - * - * @param configurationInfo the configurationInfo value to set. - * @return the LinkerResourceInner object itself. - */ - public LinkerResourceInner withConfigurationInfo(ConfigurationInfo configurationInfo) { - if (this.innerProperties() == null) { - this.innerProperties = new LinkerProperties(); - } - this.innerProperties().withConfigurationInfo(configurationInfo); - return this; - } - /** * Validates the instance. * diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/ConfigurationResultInner.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/SourceConfigurationResultInner.java similarity index 70% rename from sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/ConfigurationResultInner.java rename to sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/SourceConfigurationResultInner.java index aa97729b424d3..20e2d8ec6a64e 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/ConfigurationResultInner.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/SourceConfigurationResultInner.java @@ -17,16 +17,16 @@ * Configurations for source resource, include appSettings, connectionString and serviceBindings. */ @Fluent -public final class ConfigurationResultInner implements JsonSerializable { +public final class SourceConfigurationResultInner implements JsonSerializable { /* * The configuration properties for source resource. */ private List configurations; /** - * Creates an instance of ConfigurationResultInner class. + * Creates an instance of SourceConfigurationResultInner class. */ - public ConfigurationResultInner() { + public SourceConfigurationResultInner() { } /** @@ -42,9 +42,9 @@ public List configurations() { * Set the configurations property: The configuration properties for source resource. * * @param configurations the configurations value to set. - * @return the ConfigurationResultInner object itself. + * @return the SourceConfigurationResultInner object itself. */ - public ConfigurationResultInner withConfigurations(List configurations) { + public SourceConfigurationResultInner withConfigurations(List configurations) { this.configurations = configurations; return this; } @@ -72,16 +72,17 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of ConfigurationResultInner from the JsonReader. + * Reads an instance of SourceConfigurationResultInner from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of ConfigurationResultInner 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 ConfigurationResultInner. + * @return An instance of SourceConfigurationResultInner 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 SourceConfigurationResultInner. */ - public static ConfigurationResultInner fromJson(JsonReader jsonReader) throws IOException { + public static SourceConfigurationResultInner fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - ConfigurationResultInner deserializedConfigurationResultInner = new ConfigurationResultInner(); + SourceConfigurationResultInner deserializedSourceConfigurationResultInner + = new SourceConfigurationResultInner(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); @@ -89,13 +90,13 @@ public static ConfigurationResultInner fromJson(JsonReader jsonReader) throws IO if ("configurations".equals(fieldName)) { List configurations = reader.readArray(reader1 -> SourceConfiguration.fromJson(reader1)); - deserializedConfigurationResultInner.configurations = configurations; + deserializedSourceConfigurationResultInner.configurations = configurations; } else { reader.skipChildren(); } } - return deserializedConfigurationResultInner; + return deserializedSourceConfigurationResultInner; }); } } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/ValidateOperationResultInner.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/ValidateOperationResultInner.java index 2a02c438c5ad5..3bc94b5e0876b 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/ValidateOperationResultInner.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/ValidateOperationResultInner.java @@ -16,7 +16,7 @@ import java.util.List; /** - * The validation operation result for a Linker. + * The validation operation result for a linker. */ @Fluent public final class ValidateOperationResultInner implements JsonSerializable { @@ -26,7 +26,7 @@ public final class ValidateOperationResultInner implements JsonSerializable { @@ -43,7 +43,7 @@ public final class ValidateResult implements JsonSerializable { private OffsetDateTime reportEndTimeUtc; /* - * The resource id of the Linker source application. + * The resource id of the linker source application. */ private String sourceId; @@ -149,7 +149,7 @@ public ValidateResult withReportEndTimeUtc(OffsetDateTime reportEndTimeUtc) { } /** - * Get the sourceId property: The resource id of the Linker source application. + * Get the sourceId property: The resource id of the linker source application. * * @return the sourceId value. */ @@ -158,7 +158,7 @@ public String sourceId() { } /** - * Set the sourceId property: The resource id of the Linker source application. + * Set the sourceId property: The resource id of the linker source application. * * @param sourceId the sourceId value to set. * @return the ValidateResult object itself. diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConfigurationNameItemImpl.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConfigurationNameItemImpl.java deleted file mode 100644 index f1a7638e2a2e5..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConfigurationNameItemImpl.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.implementation; - -import com.azure.resourcemanager.servicelinker.fluent.models.ConfigurationNameItemInner; -import com.azure.resourcemanager.servicelinker.models.AuthType; -import com.azure.resourcemanager.servicelinker.models.ClientType; -import com.azure.resourcemanager.servicelinker.models.ConfigurationName; -import com.azure.resourcemanager.servicelinker.models.ConfigurationNameItem; -import com.azure.resourcemanager.servicelinker.models.DaprProperties; -import com.azure.resourcemanager.servicelinker.models.SecretSourceType; -import java.util.Collections; -import java.util.List; - -public final class ConfigurationNameItemImpl implements ConfigurationNameItem { - private ConfigurationNameItemInner innerObject; - - private final com.azure.resourcemanager.servicelinker.ServiceLinkerManager serviceManager; - - ConfigurationNameItemImpl(ConfigurationNameItemInner innerObject, - com.azure.resourcemanager.servicelinker.ServiceLinkerManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String targetService() { - return this.innerModel().targetService(); - } - - public ClientType clientType() { - return this.innerModel().clientType(); - } - - public AuthType authType() { - return this.innerModel().authType(); - } - - public SecretSourceType secretType() { - return this.innerModel().secretType(); - } - - public DaprProperties daprProperties() { - return this.innerModel().daprProperties(); - } - - public List names() { - List inner = this.innerModel().names(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public ConfigurationNameItemInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConfigurationNamesOperationsClientImpl.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConfigurationNamesOperationsClientImpl.java deleted file mode 100644 index 927cb2a9a14fb..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConfigurationNamesOperationsClientImpl.java +++ /dev/null @@ -1,268 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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.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.servicelinker.fluent.ConfigurationNamesOperationsClient; -import com.azure.resourcemanager.servicelinker.fluent.models.ConfigurationNameItemInner; -import com.azure.resourcemanager.servicelinker.models.ConfigurationNameResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ConfigurationNamesOperationsClient. - */ -public final class ConfigurationNamesOperationsClientImpl implements ConfigurationNamesOperationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ConfigurationNamesOperationsService service; - - /** - * The service client containing this operation class. - */ - private final ServiceLinkerManagementClientImpl client; - - /** - * Initializes an instance of ConfigurationNamesOperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ConfigurationNamesOperationsClientImpl(ServiceLinkerManagementClientImpl client) { - this.service = RestProxy.create(ConfigurationNamesOperationsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ServiceLinkerManagementClientConfigurationNamesOperations to be used - * by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ServiceLinkerManagem") - public interface ConfigurationNamesOperationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/providers/Microsoft.ServiceLinker/configurationNames") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, - @QueryParam("$skipToken") String skipToken, @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("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Lists the configuration names generated by Service Connector for all target, client types, auth types. - * - * @param filter OData filter options. - * @param skipToken OData skipToken option for pagination. - * @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 configuration Name list which will be set based on different target resource, client type, auth type - * along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String filter, String skipToken) { - 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.list(this.client.getEndpoint(), this.client.getApiVersion(), filter, - skipToken, 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())); - } - - /** - * Lists the configuration names generated by Service Connector for all target, client types, auth types. - * - * @param filter OData filter options. - * @param skipToken OData skipToken option for pagination. - * @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 configuration Name list which will be set based on different target resource, client type, auth type - * along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String filter, String skipToken, - 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(), filter, skipToken, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists the configuration names generated by Service Connector for all target, client types, auth types. - * - * @param filter OData filter options. - * @param skipToken OData skipToken option for pagination. - * @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 configuration Name list which will be set based on different target resource, client type, auth type as - * paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String filter, String skipToken) { - return new PagedFlux<>(() -> listSinglePageAsync(filter, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists the configuration names generated by Service Connector for all target, client types, auth types. - * - * @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 configuration Name list which will be set based on different target resource, client type, auth type as - * paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - final String filter = null; - final String skipToken = null; - return new PagedFlux<>(() -> listSinglePageAsync(filter, skipToken), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists the configuration names generated by Service Connector for all target, client types, auth types. - * - * @param filter OData filter options. - * @param skipToken OData skipToken option for pagination. - * @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 configuration Name list which will be set based on different target resource, client type, auth type as - * paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String filter, String skipToken, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(filter, skipToken, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists the configuration names generated by Service Connector for all target, client types, auth types. - * - * @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 configuration Name list which will be set based on different target resource, client type, auth type as - * paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - final String filter = null; - final String skipToken = null; - return new PagedIterable<>(listAsync(filter, skipToken)); - } - - /** - * Lists the configuration names generated by Service Connector for all target, client types, auth types. - * - * @param filter OData filter options. - * @param skipToken OData skipToken option for pagination. - * @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 configuration Name list which will be set based on different target resource, client type, auth type as - * paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String filter, String skipToken, Context context) { - return new PagedIterable<>(listAsync(filter, skipToken, 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 configuration Name list which will be set based on different target resource, client type, auth type - * along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @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(), 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. - * @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 configuration Name list which will be set based on different target resource, client type, auth type - * along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @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.")); - } - 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)); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConfigurationNamesOperationsImpl.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConfigurationNamesOperationsImpl.java deleted file mode 100644 index d61ea9d4461c3..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConfigurationNamesOperationsImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.servicelinker.fluent.ConfigurationNamesOperationsClient; -import com.azure.resourcemanager.servicelinker.fluent.models.ConfigurationNameItemInner; -import com.azure.resourcemanager.servicelinker.models.ConfigurationNameItem; -import com.azure.resourcemanager.servicelinker.models.ConfigurationNamesOperations; - -public final class ConfigurationNamesOperationsImpl implements ConfigurationNamesOperations { - private static final ClientLogger LOGGER = new ClientLogger(ConfigurationNamesOperationsImpl.class); - - private final ConfigurationNamesOperationsClient innerClient; - - private final com.azure.resourcemanager.servicelinker.ServiceLinkerManager serviceManager; - - public ConfigurationNamesOperationsImpl(ConfigurationNamesOperationsClient innerClient, - com.azure.resourcemanager.servicelinker.ServiceLinkerManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ConfigurationNameItemImpl(inner1, this.manager())); - } - - public PagedIterable list(String filter, String skipToken, Context context) { - PagedIterable inner = this.serviceClient().list(filter, skipToken, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ConfigurationNameItemImpl(inner1, this.manager())); - } - - private ConfigurationNamesOperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConnectorsClientImpl.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConnectorsClientImpl.java deleted file mode 100644 index d176b6e3aae48..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConnectorsClientImpl.java +++ /dev/null @@ -1,2692 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -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.management.polling.PollResult; -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.servicelinker.fluent.ConnectorsClient; -import com.azure.resourcemanager.servicelinker.fluent.models.ConfigurationResultInner; -import com.azure.resourcemanager.servicelinker.fluent.models.DryrunResourceInner; -import com.azure.resourcemanager.servicelinker.fluent.models.LinkerResourceInner; -import com.azure.resourcemanager.servicelinker.fluent.models.ValidateOperationResultInner; -import com.azure.resourcemanager.servicelinker.models.ConfigurationInfo; -import com.azure.resourcemanager.servicelinker.models.DryrunList; -import com.azure.resourcemanager.servicelinker.models.DryrunPatch; -import com.azure.resourcemanager.servicelinker.models.LinkerPatch; -import com.azure.resourcemanager.servicelinker.models.ResourceList; -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 ConnectorsClient. - */ -public final class ConnectorsClientImpl implements ConnectorsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ConnectorsService service; - - /** - * The service client containing this operation class. - */ - private final ServiceLinkerManagementClientImpl client; - - /** - * Initializes an instance of ConnectorsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ConnectorsClientImpl(ServiceLinkerManagementClientImpl client) { - this.service - = RestProxy.create(ConnectorsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ServiceLinkerManagementClientConnectors to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ServiceLinkerManagem") - public interface ConnectorsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/dryruns") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listDryrun(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/dryruns/{dryrunName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getDryrun(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, @PathParam("dryrunName") String dryrunName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/dryruns/{dryrunName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createDryrun(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, @PathParam("dryrunName") String dryrunName, - @BodyParam("application/json") DryrunResourceInner parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/dryruns/{dryrunName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateDryrun(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, @PathParam("dryrunName") String dryrunName, - @BodyParam("application/json") DryrunPatch parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/dryruns/{dryrunName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> deleteDryrun(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, @PathParam("dryrunName") String dryrunName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("location") String location, - @PathParam("connectorName") String connectorName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("location") String location, - @PathParam("connectorName") String connectorName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") LinkerResourceInner parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("location") String location, - @PathParam("connectorName") String connectorName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("location") String location, - @PathParam("connectorName") String connectorName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") LinkerPatch parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}/validate") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> validate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("location") String location, - @PathParam("connectorName") String connectorName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceLinker/locations/{location}/connectors/{connectorName}/generateConfigurations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> generateConfigurations(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("location") String location, - @PathParam("connectorName") String connectorName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ConfigurationInfo parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listDryrunNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @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("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * list dryrun jobs. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @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 dryrun along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDryrunSinglePageAsync(String subscriptionId, - String resourceGroupName, String location) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listDryrun(this.client.getEndpoint(), subscriptionId, resourceGroupName, - location, 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())); - } - - /** - * list dryrun jobs. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @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 dryrun along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDryrunSinglePageAsync(String subscriptionId, - String resourceGroupName, String location, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listDryrun(this.client.getEndpoint(), subscriptionId, resourceGroupName, location, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * list dryrun jobs. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @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 dryrun as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDryrunAsync(String subscriptionId, String resourceGroupName, - String location) { - return new PagedFlux<>(() -> listDryrunSinglePageAsync(subscriptionId, resourceGroupName, location), - nextLink -> listDryrunNextSinglePageAsync(nextLink)); - } - - /** - * list dryrun jobs. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @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 dryrun as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDryrunAsync(String subscriptionId, String resourceGroupName, - String location, Context context) { - return new PagedFlux<>(() -> listDryrunSinglePageAsync(subscriptionId, resourceGroupName, location, context), - nextLink -> listDryrunNextSinglePageAsync(nextLink, context)); - } - - /** - * list dryrun jobs. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @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 dryrun as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDryrun(String subscriptionId, String resourceGroupName, - String location) { - return new PagedIterable<>(listDryrunAsync(subscriptionId, resourceGroupName, location)); - } - - /** - * list dryrun jobs. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @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 dryrun as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDryrun(String subscriptionId, String resourceGroupName, - String location, Context context) { - return new PagedIterable<>(listDryrunAsync(subscriptionId, resourceGroupName, location, context)); - } - - /** - * get a dryrun job. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @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 dryrun job along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDryrunWithResponseAsync(String subscriptionId, - String resourceGroupName, String location, String dryrunName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (dryrunName == null) { - return Mono.error(new IllegalArgumentException("Parameter dryrunName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getDryrun(this.client.getEndpoint(), subscriptionId, resourceGroupName, - location, this.client.getApiVersion(), dryrunName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * get a dryrun job. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @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 dryrun job along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDryrunWithResponseAsync(String subscriptionId, - String resourceGroupName, String location, String dryrunName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (dryrunName == null) { - return Mono.error(new IllegalArgumentException("Parameter dryrunName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getDryrun(this.client.getEndpoint(), subscriptionId, resourceGroupName, location, - this.client.getApiVersion(), dryrunName, accept, context); - } - - /** - * get a dryrun job. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @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 dryrun job on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getDryrunAsync(String subscriptionId, String resourceGroupName, String location, - String dryrunName) { - return getDryrunWithResponseAsync(subscriptionId, resourceGroupName, location, dryrunName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * get a dryrun job. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @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 dryrun job along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDryrunWithResponse(String subscriptionId, String resourceGroupName, - String location, String dryrunName, Context context) { - return getDryrunWithResponseAsync(subscriptionId, resourceGroupName, location, dryrunName, context).block(); - } - - /** - * get a dryrun job. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @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 dryrun job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DryrunResourceInner getDryrun(String subscriptionId, String resourceGroupName, String location, - String dryrunName) { - return getDryrunWithResponse(subscriptionId, resourceGroupName, location, dryrunName, Context.NONE).getValue(); - } - - /** - * create a dryrun job to do necessary check before actual creation. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createDryrunWithResponseAsync(String subscriptionId, - String resourceGroupName, String location, String dryrunName, DryrunResourceInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (dryrunName == null) { - return Mono.error(new IllegalArgumentException("Parameter dryrunName 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"; - return FluxUtil - .withContext(context -> service.createDryrun(this.client.getEndpoint(), subscriptionId, resourceGroupName, - location, this.client.getApiVersion(), dryrunName, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * create a dryrun job to do necessary check before actual creation. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createDryrunWithResponseAsync(String subscriptionId, - String resourceGroupName, String location, String dryrunName, DryrunResourceInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (dryrunName == null) { - return Mono.error(new IllegalArgumentException("Parameter dryrunName 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.createDryrun(this.client.getEndpoint(), subscriptionId, resourceGroupName, location, - this.client.getApiVersion(), dryrunName, parameters, accept, context); - } - - /** - * create a dryrun job to do necessary check before actual creation. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 PollerFlux} for polling of a dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DryrunResourceInner> beginCreateDryrunAsync( - String subscriptionId, String resourceGroupName, String location, String dryrunName, - DryrunResourceInner parameters) { - Mono>> mono - = createDryrunWithResponseAsync(subscriptionId, resourceGroupName, location, dryrunName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DryrunResourceInner.class, DryrunResourceInner.class, this.client.getContext()); - } - - /** - * create a dryrun job to do necessary check before actual creation. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 PollerFlux} for polling of a dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DryrunResourceInner> beginCreateDryrunAsync( - String subscriptionId, String resourceGroupName, String location, String dryrunName, - DryrunResourceInner parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createDryrunWithResponseAsync(subscriptionId, resourceGroupName, - location, dryrunName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DryrunResourceInner.class, DryrunResourceInner.class, context); - } - - /** - * create a dryrun job to do necessary check before actual creation. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 SyncPoller} for polling of a dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DryrunResourceInner> beginCreateDryrun(String subscriptionId, - String resourceGroupName, String location, String dryrunName, DryrunResourceInner parameters) { - return this.beginCreateDryrunAsync(subscriptionId, resourceGroupName, location, dryrunName, parameters) - .getSyncPoller(); - } - - /** - * create a dryrun job to do necessary check before actual creation. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 SyncPoller} for polling of a dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DryrunResourceInner> beginCreateDryrun(String subscriptionId, - String resourceGroupName, String location, String dryrunName, DryrunResourceInner parameters, Context context) { - return this.beginCreateDryrunAsync(subscriptionId, resourceGroupName, location, dryrunName, parameters, context) - .getSyncPoller(); - } - - /** - * create a dryrun job to do necessary check before actual creation. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createDryrunAsync(String subscriptionId, String resourceGroupName, - String location, String dryrunName, DryrunResourceInner parameters) { - return beginCreateDryrunAsync(subscriptionId, resourceGroupName, location, dryrunName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * create a dryrun job to do necessary check before actual creation. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createDryrunAsync(String subscriptionId, String resourceGroupName, - String location, String dryrunName, DryrunResourceInner parameters, Context context) { - return beginCreateDryrunAsync(subscriptionId, resourceGroupName, location, dryrunName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * create a dryrun job to do necessary check before actual creation. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DryrunResourceInner createDryrun(String subscriptionId, String resourceGroupName, String location, - String dryrunName, DryrunResourceInner parameters) { - return createDryrunAsync(subscriptionId, resourceGroupName, location, dryrunName, parameters).block(); - } - - /** - * create a dryrun job to do necessary check before actual creation. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DryrunResourceInner createDryrun(String subscriptionId, String resourceGroupName, String location, - String dryrunName, DryrunResourceInner parameters, Context context) { - return createDryrunAsync(subscriptionId, resourceGroupName, location, dryrunName, parameters, context).block(); - } - - /** - * update a dryrun job to do necessary check before actual creation. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateDryrunWithResponseAsync(String subscriptionId, - String resourceGroupName, String location, String dryrunName, DryrunPatch parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (dryrunName == null) { - return Mono.error(new IllegalArgumentException("Parameter dryrunName 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"; - return FluxUtil - .withContext(context -> service.updateDryrun(this.client.getEndpoint(), subscriptionId, resourceGroupName, - location, this.client.getApiVersion(), dryrunName, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * update a dryrun job to do necessary check before actual creation. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateDryrunWithResponseAsync(String subscriptionId, - String resourceGroupName, String location, String dryrunName, DryrunPatch parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (dryrunName == null) { - return Mono.error(new IllegalArgumentException("Parameter dryrunName 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.updateDryrun(this.client.getEndpoint(), subscriptionId, resourceGroupName, location, - this.client.getApiVersion(), dryrunName, parameters, accept, context); - } - - /** - * update a dryrun job to do necessary check before actual creation. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 PollerFlux} for polling of a dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DryrunResourceInner> beginUpdateDryrunAsync( - String subscriptionId, String resourceGroupName, String location, String dryrunName, DryrunPatch parameters) { - Mono>> mono - = updateDryrunWithResponseAsync(subscriptionId, resourceGroupName, location, dryrunName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DryrunResourceInner.class, DryrunResourceInner.class, this.client.getContext()); - } - - /** - * update a dryrun job to do necessary check before actual creation. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 PollerFlux} for polling of a dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DryrunResourceInner> beginUpdateDryrunAsync( - String subscriptionId, String resourceGroupName, String location, String dryrunName, DryrunPatch parameters, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = updateDryrunWithResponseAsync(subscriptionId, resourceGroupName, - location, dryrunName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DryrunResourceInner.class, DryrunResourceInner.class, context); - } - - /** - * update a dryrun job to do necessary check before actual creation. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 SyncPoller} for polling of a dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DryrunResourceInner> beginUpdateDryrun(String subscriptionId, - String resourceGroupName, String location, String dryrunName, DryrunPatch parameters) { - return this.beginUpdateDryrunAsync(subscriptionId, resourceGroupName, location, dryrunName, parameters) - .getSyncPoller(); - } - - /** - * update a dryrun job to do necessary check before actual creation. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 SyncPoller} for polling of a dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DryrunResourceInner> beginUpdateDryrun(String subscriptionId, - String resourceGroupName, String location, String dryrunName, DryrunPatch parameters, Context context) { - return this.beginUpdateDryrunAsync(subscriptionId, resourceGroupName, location, dryrunName, parameters, context) - .getSyncPoller(); - } - - /** - * update a dryrun job to do necessary check before actual creation. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateDryrunAsync(String subscriptionId, String resourceGroupName, - String location, String dryrunName, DryrunPatch parameters) { - return beginUpdateDryrunAsync(subscriptionId, resourceGroupName, location, dryrunName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * update a dryrun job to do necessary check before actual creation. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateDryrunAsync(String subscriptionId, String resourceGroupName, - String location, String dryrunName, DryrunPatch parameters, Context context) { - return beginUpdateDryrunAsync(subscriptionId, resourceGroupName, location, dryrunName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * update a dryrun job to do necessary check before actual creation. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DryrunResourceInner updateDryrun(String subscriptionId, String resourceGroupName, String location, - String dryrunName, DryrunPatch parameters) { - return updateDryrunAsync(subscriptionId, resourceGroupName, location, dryrunName, parameters).block(); - } - - /** - * update a dryrun job to do necessary check before actual creation. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DryrunResourceInner updateDryrun(String subscriptionId, String resourceGroupName, String location, - String dryrunName, DryrunPatch parameters, Context context) { - return updateDryrunAsync(subscriptionId, resourceGroupName, location, dryrunName, parameters, context).block(); - } - - /** - * delete a dryrun job. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @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> deleteDryrunWithResponseAsync(String subscriptionId, String resourceGroupName, - String location, String dryrunName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (dryrunName == null) { - return Mono.error(new IllegalArgumentException("Parameter dryrunName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.deleteDryrun(this.client.getEndpoint(), subscriptionId, resourceGroupName, - location, this.client.getApiVersion(), dryrunName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * delete a dryrun job. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @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> deleteDryrunWithResponseAsync(String subscriptionId, String resourceGroupName, - String location, String dryrunName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (dryrunName == null) { - return Mono.error(new IllegalArgumentException("Parameter dryrunName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.deleteDryrun(this.client.getEndpoint(), subscriptionId, resourceGroupName, location, - this.client.getApiVersion(), dryrunName, accept, context); - } - - /** - * delete a dryrun job. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @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 deleteDryrunAsync(String subscriptionId, String resourceGroupName, String location, - String dryrunName) { - return deleteDryrunWithResponseAsync(subscriptionId, resourceGroupName, location, dryrunName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * delete a dryrun job. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @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 deleteDryrunWithResponse(String subscriptionId, String resourceGroupName, String location, - String dryrunName, Context context) { - return deleteDryrunWithResponseAsync(subscriptionId, resourceGroupName, location, dryrunName, context).block(); - } - - /** - * delete a dryrun job. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @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 deleteDryrun(String subscriptionId, String resourceGroupName, String location, String dryrunName) { - deleteDryrunWithResponse(subscriptionId, resourceGroupName, location, dryrunName, Context.NONE); - } - - /** - * Returns list of connector which connects to the resource, which supports to config the target service during the - * resource provision. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @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 Linker along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String subscriptionId, - String resourceGroupName, String location) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), subscriptionId, resourceGroupName, location, - 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())); - } - - /** - * Returns list of connector which connects to the resource, which supports to config the target service during the - * resource provision. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @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 Linker along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String subscriptionId, - String resourceGroupName, String location, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), subscriptionId, resourceGroupName, location, this.client.getApiVersion(), - accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Returns list of connector which connects to the resource, which supports to config the target service during the - * resource provision. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @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 Linker as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String subscriptionId, String resourceGroupName, String location) { - return new PagedFlux<>(() -> listSinglePageAsync(subscriptionId, resourceGroupName, location), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Returns list of connector which connects to the resource, which supports to config the target service during the - * resource provision. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @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 Linker as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String subscriptionId, String resourceGroupName, String location, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(subscriptionId, resourceGroupName, location, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Returns list of connector which connects to the resource, which supports to config the target service during the - * resource provision. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @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 Linker as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String subscriptionId, String resourceGroupName, String location) { - return new PagedIterable<>(listAsync(subscriptionId, resourceGroupName, location)); - } - - /** - * Returns list of connector which connects to the resource, which supports to config the target service during the - * resource provision. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @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 Linker as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String subscriptionId, String resourceGroupName, String location, - Context context) { - return new PagedIterable<>(listAsync(subscriptionId, resourceGroupName, location, context)); - } - - /** - * Returns Connector resource for a given name. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 linker of source and target resource along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String subscriptionId, String resourceGroupName, - String location, String connectorName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (connectorName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectorName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), subscriptionId, resourceGroupName, location, - connectorName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Returns Connector resource for a given name. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 linker of source and target resource along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String subscriptionId, String resourceGroupName, - String location, String connectorName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (connectorName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectorName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), subscriptionId, resourceGroupName, location, connectorName, - this.client.getApiVersion(), accept, context); - } - - /** - * Returns Connector resource for a given name. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 linker of source and target resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String subscriptionId, String resourceGroupName, String location, - String connectorName) { - return getWithResponseAsync(subscriptionId, resourceGroupName, location, connectorName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Returns Connector resource for a given name. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 linker of source and target resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String subscriptionId, String resourceGroupName, - String location, String connectorName, Context context) { - return getWithResponseAsync(subscriptionId, resourceGroupName, location, connectorName, context).block(); - } - - /** - * Returns Connector resource for a given name. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 linker of source and target resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LinkerResourceInner get(String subscriptionId, String resourceGroupName, String location, - String connectorName) { - return getWithResponse(subscriptionId, resourceGroupName, location, connectorName, Context.NONE).getValue(); - } - - /** - * Create or update Connector resource. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connector details. - * @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 linker of source and target resource along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String subscriptionId, - String resourceGroupName, String location, String connectorName, LinkerResourceInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (connectorName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectorName 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"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), subscriptionId, resourceGroupName, - location, connectorName, this.client.getApiVersion(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update Connector resource. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connector details. - * @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 linker of source and target resource along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String subscriptionId, - String resourceGroupName, String location, String connectorName, LinkerResourceInner parameters, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (connectorName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectorName 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.createOrUpdate(this.client.getEndpoint(), subscriptionId, resourceGroupName, location, - connectorName, this.client.getApiVersion(), parameters, accept, context); - } - - /** - * Create or update Connector resource. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connector details. - * @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 linker of source and target resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, LinkerResourceInner> beginCreateOrUpdateAsync( - String subscriptionId, String resourceGroupName, String location, String connectorName, - LinkerResourceInner parameters) { - Mono>> mono - = createOrUpdateWithResponseAsync(subscriptionId, resourceGroupName, location, connectorName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - LinkerResourceInner.class, LinkerResourceInner.class, this.client.getContext()); - } - - /** - * Create or update Connector resource. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connector details. - * @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 PollerFlux} for polling of linker of source and target resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, LinkerResourceInner> beginCreateOrUpdateAsync( - String subscriptionId, String resourceGroupName, String location, String connectorName, - LinkerResourceInner parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(subscriptionId, resourceGroupName, - location, connectorName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - LinkerResourceInner.class, LinkerResourceInner.class, context); - } - - /** - * Create or update Connector resource. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connector details. - * @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 linker of source and target resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LinkerResourceInner> beginCreateOrUpdate(String subscriptionId, - String resourceGroupName, String location, String connectorName, LinkerResourceInner parameters) { - return this.beginCreateOrUpdateAsync(subscriptionId, resourceGroupName, location, connectorName, parameters) - .getSyncPoller(); - } - - /** - * Create or update Connector resource. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connector details. - * @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 linker of source and target resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LinkerResourceInner> beginCreateOrUpdate(String subscriptionId, - String resourceGroupName, String location, String connectorName, LinkerResourceInner parameters, - Context context) { - return this - .beginCreateOrUpdateAsync(subscriptionId, resourceGroupName, location, connectorName, parameters, context) - .getSyncPoller(); - } - - /** - * Create or update Connector resource. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connector details. - * @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 linker of source and target resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String subscriptionId, String resourceGroupName, - String location, String connectorName, LinkerResourceInner parameters) { - return beginCreateOrUpdateAsync(subscriptionId, resourceGroupName, location, connectorName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update Connector resource. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connector details. - * @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 linker of source and target resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String subscriptionId, String resourceGroupName, - String location, String connectorName, LinkerResourceInner parameters, Context context) { - return beginCreateOrUpdateAsync(subscriptionId, resourceGroupName, location, connectorName, parameters, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update Connector resource. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connector details. - * @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 linker of source and target resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LinkerResourceInner createOrUpdate(String subscriptionId, String resourceGroupName, String location, - String connectorName, LinkerResourceInner parameters) { - return createOrUpdateAsync(subscriptionId, resourceGroupName, location, connectorName, parameters).block(); - } - - /** - * Create or update Connector resource. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connector details. - * @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 linker of source and target resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LinkerResourceInner createOrUpdate(String subscriptionId, String resourceGroupName, String location, - String connectorName, LinkerResourceInner parameters, Context context) { - return createOrUpdateAsync(subscriptionId, resourceGroupName, location, connectorName, parameters, context) - .block(); - } - - /** - * Delete a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 subscriptionId, String resourceGroupName, - String location, String connectorName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (connectorName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectorName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), subscriptionId, resourceGroupName, - location, connectorName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 subscriptionId, String resourceGroupName, - String location, String connectorName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (connectorName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectorName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), subscriptionId, resourceGroupName, location, connectorName, - this.client.getApiVersion(), accept, context); - } - - /** - * Delete a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String subscriptionId, String resourceGroupName, - String location, String connectorName) { - Mono>> mono - = deleteWithResponseAsync(subscriptionId, resourceGroupName, location, connectorName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String subscriptionId, String resourceGroupName, - String location, String connectorName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(subscriptionId, resourceGroupName, location, connectorName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String subscriptionId, String resourceGroupName, - String location, String connectorName) { - return this.beginDeleteAsync(subscriptionId, resourceGroupName, location, connectorName).getSyncPoller(); - } - - /** - * Delete a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String subscriptionId, String resourceGroupName, - String location, String connectorName, Context context) { - return this.beginDeleteAsync(subscriptionId, resourceGroupName, location, connectorName, context) - .getSyncPoller(); - } - - /** - * Delete a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 subscriptionId, String resourceGroupName, String location, - String connectorName) { - return beginDeleteAsync(subscriptionId, resourceGroupName, location, connectorName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String subscriptionId, String resourceGroupName, String location, - String connectorName, Context context) { - return beginDeleteAsync(subscriptionId, resourceGroupName, location, connectorName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 subscriptionId, String resourceGroupName, String location, String connectorName) { - deleteAsync(subscriptionId, resourceGroupName, location, connectorName).block(); - } - - /** - * Delete a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String subscriptionId, String resourceGroupName, String location, String connectorName, - Context context) { - deleteAsync(subscriptionId, resourceGroupName, location, connectorName, context).block(); - } - - /** - * Operation to update an existing Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connector details. - * @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 linker of source and target resource along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String subscriptionId, String resourceGroupName, - String location, String connectorName, LinkerPatch parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (connectorName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectorName 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"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), subscriptionId, resourceGroupName, - location, connectorName, this.client.getApiVersion(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Operation to update an existing Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connector details. - * @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 linker of source and target resource along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String subscriptionId, String resourceGroupName, - String location, String connectorName, LinkerPatch parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (connectorName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectorName 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(), subscriptionId, resourceGroupName, location, connectorName, - this.client.getApiVersion(), parameters, accept, context); - } - - /** - * Operation to update an existing Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connector details. - * @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 linker of source and target resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, LinkerResourceInner> beginUpdateAsync(String subscriptionId, - String resourceGroupName, String location, String connectorName, LinkerPatch parameters) { - Mono>> mono - = updateWithResponseAsync(subscriptionId, resourceGroupName, location, connectorName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - LinkerResourceInner.class, LinkerResourceInner.class, this.client.getContext()); - } - - /** - * Operation to update an existing Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connector details. - * @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 PollerFlux} for polling of linker of source and target resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, LinkerResourceInner> beginUpdateAsync(String subscriptionId, - String resourceGroupName, String location, String connectorName, LinkerPatch parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(subscriptionId, resourceGroupName, location, connectorName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - LinkerResourceInner.class, LinkerResourceInner.class, context); - } - - /** - * Operation to update an existing Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connector details. - * @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 linker of source and target resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LinkerResourceInner> beginUpdate(String subscriptionId, - String resourceGroupName, String location, String connectorName, LinkerPatch parameters) { - return this.beginUpdateAsync(subscriptionId, resourceGroupName, location, connectorName, parameters) - .getSyncPoller(); - } - - /** - * Operation to update an existing Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connector details. - * @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 linker of source and target resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LinkerResourceInner> beginUpdate(String subscriptionId, - String resourceGroupName, String location, String connectorName, LinkerPatch parameters, Context context) { - return this.beginUpdateAsync(subscriptionId, resourceGroupName, location, connectorName, parameters, context) - .getSyncPoller(); - } - - /** - * Operation to update an existing Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connector details. - * @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 linker of source and target resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String subscriptionId, String resourceGroupName, String location, - String connectorName, LinkerPatch parameters) { - return beginUpdateAsync(subscriptionId, resourceGroupName, location, connectorName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Operation to update an existing Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connector details. - * @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 linker of source and target resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String subscriptionId, String resourceGroupName, String location, - String connectorName, LinkerPatch parameters, Context context) { - return beginUpdateAsync(subscriptionId, resourceGroupName, location, connectorName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Operation to update an existing Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connector details. - * @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 linker of source and target resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LinkerResourceInner update(String subscriptionId, String resourceGroupName, String location, - String connectorName, LinkerPatch parameters) { - return updateAsync(subscriptionId, resourceGroupName, location, connectorName, parameters).block(); - } - - /** - * Operation to update an existing Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connector details. - * @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 linker of source and target resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LinkerResourceInner update(String subscriptionId, String resourceGroupName, String location, - String connectorName, LinkerPatch parameters, Context context) { - return updateAsync(subscriptionId, resourceGroupName, location, connectorName, parameters, context).block(); - } - - /** - * Validate a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 validation operation result for a Linker along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> validateWithResponseAsync(String subscriptionId, String resourceGroupName, - String location, String connectorName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (connectorName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectorName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.validate(this.client.getEndpoint(), subscriptionId, resourceGroupName, - location, connectorName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Validate a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 validation operation result for a Linker along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> validateWithResponseAsync(String subscriptionId, String resourceGroupName, - String location, String connectorName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (connectorName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectorName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.validate(this.client.getEndpoint(), subscriptionId, resourceGroupName, location, connectorName, - this.client.getApiVersion(), accept, context); - } - - /** - * Validate a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 PollerFlux} for polling of the validation operation result for a Linker. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ValidateOperationResultInner> - beginValidateAsync(String subscriptionId, String resourceGroupName, String location, String connectorName) { - Mono>> mono - = validateWithResponseAsync(subscriptionId, resourceGroupName, location, connectorName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ValidateOperationResultInner.class, ValidateOperationResultInner.class, - this.client.getContext()); - } - - /** - * Validate a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 PollerFlux} for polling of the validation operation result for a Linker. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ValidateOperationResultInner> beginValidateAsync( - String subscriptionId, String resourceGroupName, String location, String connectorName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = validateWithResponseAsync(subscriptionId, resourceGroupName, location, connectorName, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ValidateOperationResultInner.class, ValidateOperationResultInner.class, - context); - } - - /** - * Validate a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 SyncPoller} for polling of the validation operation result for a Linker. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ValidateOperationResultInner> - beginValidate(String subscriptionId, String resourceGroupName, String location, String connectorName) { - return this.beginValidateAsync(subscriptionId, resourceGroupName, location, connectorName).getSyncPoller(); - } - - /** - * Validate a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 SyncPoller} for polling of the validation operation result for a Linker. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ValidateOperationResultInner> beginValidate( - String subscriptionId, String resourceGroupName, String location, String connectorName, Context context) { - return this.beginValidateAsync(subscriptionId, resourceGroupName, location, connectorName, context) - .getSyncPoller(); - } - - /** - * Validate a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 validation operation result for a Linker on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono validateAsync(String subscriptionId, String resourceGroupName, - String location, String connectorName) { - return beginValidateAsync(subscriptionId, resourceGroupName, location, connectorName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Validate a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 validation operation result for a Linker on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono validateAsync(String subscriptionId, String resourceGroupName, - String location, String connectorName, Context context) { - return beginValidateAsync(subscriptionId, resourceGroupName, location, connectorName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Validate a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 validation operation result for a Linker. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ValidateOperationResultInner validate(String subscriptionId, String resourceGroupName, String location, - String connectorName) { - return validateAsync(subscriptionId, resourceGroupName, location, connectorName).block(); - } - - /** - * Validate a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 validation operation result for a Linker. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ValidateOperationResultInner validate(String subscriptionId, String resourceGroupName, String location, - String connectorName, Context context) { - return validateAsync(subscriptionId, resourceGroupName, location, connectorName, context).block(); - } - - /** - * Generate configurations for a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connection Info, including format, secret store, etc. - * @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 configurations for source resource, include appSettings, connectionString and serviceBindings along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> generateConfigurationsWithResponseAsync(String subscriptionId, - String resourceGroupName, String location, String connectorName, ConfigurationInfo parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (connectorName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectorName is required and cannot be null.")); - } - if (parameters != null) { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.generateConfigurations(this.client.getEndpoint(), subscriptionId, - resourceGroupName, location, connectorName, this.client.getApiVersion(), parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Generate configurations for a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connection Info, including format, secret store, etc. - * @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 configurations for source resource, include appSettings, connectionString and serviceBindings along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> generateConfigurationsWithResponseAsync(String subscriptionId, - String resourceGroupName, String location, String connectorName, ConfigurationInfo parameters, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (subscriptionId == null) { - return Mono.error(new IllegalArgumentException("Parameter subscriptionId is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (connectorName == null) { - return Mono.error(new IllegalArgumentException("Parameter connectorName is required and cannot be null.")); - } - if (parameters != null) { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.generateConfigurations(this.client.getEndpoint(), subscriptionId, resourceGroupName, location, - connectorName, this.client.getApiVersion(), parameters, accept, context); - } - - /** - * Generate configurations for a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 configurations for source resource, include appSettings, connectionString and serviceBindings on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono generateConfigurationsAsync(String subscriptionId, String resourceGroupName, - String location, String connectorName) { - final ConfigurationInfo parameters = null; - return generateConfigurationsWithResponseAsync(subscriptionId, resourceGroupName, location, connectorName, - parameters).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Generate configurations for a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connection Info, including format, secret store, etc. - * @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 configurations for source resource, include appSettings, connectionString and serviceBindings along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response generateConfigurationsWithResponse(String subscriptionId, - String resourceGroupName, String location, String connectorName, ConfigurationInfo parameters, - Context context) { - return generateConfigurationsWithResponseAsync(subscriptionId, resourceGroupName, location, connectorName, - parameters, context).block(); - } - - /** - * Generate configurations for a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 configurations for source resource, include appSettings, connectionString and serviceBindings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ConfigurationResultInner generateConfigurations(String subscriptionId, String resourceGroupName, - String location, String connectorName) { - final ConfigurationInfo parameters = null; - return generateConfigurationsWithResponse(subscriptionId, resourceGroupName, location, connectorName, - parameters, Context.NONE).getValue(); - } - - /** - * 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 dryrun along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDryrunNextSinglePageAsync(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.listDryrunNext(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. - * @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 dryrun along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDryrunNextSinglePageAsync(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.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listDryrunNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> 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. - * @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 Linker along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @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(), 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. - * @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 Linker along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @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.")); - } - 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)); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConnectorsImpl.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConnectorsImpl.java deleted file mode 100644 index b96bf88bf5e9b..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConnectorsImpl.java +++ /dev/null @@ -1,327 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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.servicelinker.fluent.ConnectorsClient; -import com.azure.resourcemanager.servicelinker.fluent.models.ConfigurationResultInner; -import com.azure.resourcemanager.servicelinker.fluent.models.DryrunResourceInner; -import com.azure.resourcemanager.servicelinker.fluent.models.LinkerResourceInner; -import com.azure.resourcemanager.servicelinker.fluent.models.ValidateOperationResultInner; -import com.azure.resourcemanager.servicelinker.models.ConfigurationInfo; -import com.azure.resourcemanager.servicelinker.models.ConfigurationResult; -import com.azure.resourcemanager.servicelinker.models.Connectors; -import com.azure.resourcemanager.servicelinker.models.DryrunResource; -import com.azure.resourcemanager.servicelinker.models.LinkerPatch; -import com.azure.resourcemanager.servicelinker.models.LinkerResource; -import com.azure.resourcemanager.servicelinker.models.ValidateOperationResult; - -public final class ConnectorsImpl implements Connectors { - private static final ClientLogger LOGGER = new ClientLogger(ConnectorsImpl.class); - - private final ConnectorsClient innerClient; - - private final com.azure.resourcemanager.servicelinker.ServiceLinkerManager serviceManager; - - public ConnectorsImpl(ConnectorsClient innerClient, - com.azure.resourcemanager.servicelinker.ServiceLinkerManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listDryrun(String subscriptionId, String resourceGroupName, String location) { - PagedIterable inner - = this.serviceClient().listDryrun(subscriptionId, resourceGroupName, location); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DryrunResourceImpl(inner1, this.manager())); - } - - public PagedIterable listDryrun(String subscriptionId, String resourceGroupName, String location, - Context context) { - PagedIterable inner - = this.serviceClient().listDryrun(subscriptionId, resourceGroupName, location, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DryrunResourceImpl(inner1, this.manager())); - } - - public Response getDryrunWithResponse(String subscriptionId, String resourceGroupName, - String location, String dryrunName, Context context) { - Response inner = this.serviceClient() - .getDryrunWithResponse(subscriptionId, resourceGroupName, location, dryrunName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DryrunResourceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DryrunResource getDryrun(String subscriptionId, String resourceGroupName, String location, - String dryrunName) { - DryrunResourceInner inner - = this.serviceClient().getDryrun(subscriptionId, resourceGroupName, location, dryrunName); - if (inner != null) { - return new DryrunResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteDryrunWithResponse(String subscriptionId, String resourceGroupName, String location, - String dryrunName, Context context) { - return this.serviceClient() - .deleteDryrunWithResponse(subscriptionId, resourceGroupName, location, dryrunName, context); - } - - public void deleteDryrun(String subscriptionId, String resourceGroupName, String location, String dryrunName) { - this.serviceClient().deleteDryrun(subscriptionId, resourceGroupName, location, dryrunName); - } - - public PagedIterable list(String subscriptionId, String resourceGroupName, String location) { - PagedIterable inner - = this.serviceClient().list(subscriptionId, resourceGroupName, location); - return ResourceManagerUtils.mapPage(inner, inner1 -> new LinkerResourceImpl(inner1, this.manager())); - } - - public PagedIterable list(String subscriptionId, String resourceGroupName, String location, - Context context) { - PagedIterable inner - = this.serviceClient().list(subscriptionId, resourceGroupName, location, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new LinkerResourceImpl(inner1, this.manager())); - } - - public Response getWithResponse(String subscriptionId, String resourceGroupName, String location, - String connectorName, Context context) { - Response inner - = this.serviceClient().getWithResponse(subscriptionId, resourceGroupName, location, connectorName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new LinkerResourceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public LinkerResource get(String subscriptionId, String resourceGroupName, String location, String connectorName) { - LinkerResourceInner inner - = this.serviceClient().get(subscriptionId, resourceGroupName, location, connectorName); - if (inner != null) { - return new LinkerResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public LinkerResource createOrUpdate(String subscriptionId, String resourceGroupName, String location, - String connectorName, LinkerResourceInner parameters) { - LinkerResourceInner inner = this.serviceClient() - .createOrUpdate(subscriptionId, resourceGroupName, location, connectorName, parameters); - if (inner != null) { - return new LinkerResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public LinkerResource createOrUpdate(String subscriptionId, String resourceGroupName, String location, - String connectorName, LinkerResourceInner parameters, Context context) { - LinkerResourceInner inner = this.serviceClient() - .createOrUpdate(subscriptionId, resourceGroupName, location, connectorName, parameters, context); - if (inner != null) { - return new LinkerResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String subscriptionId, String resourceGroupName, String location, String connectorName) { - this.serviceClient().delete(subscriptionId, resourceGroupName, location, connectorName); - } - - public void delete(String subscriptionId, String resourceGroupName, String location, String connectorName, - Context context) { - this.serviceClient().delete(subscriptionId, resourceGroupName, location, connectorName, context); - } - - public LinkerResource update(String subscriptionId, String resourceGroupName, String location, String connectorName, - LinkerPatch parameters) { - LinkerResourceInner inner - = this.serviceClient().update(subscriptionId, resourceGroupName, location, connectorName, parameters); - if (inner != null) { - return new LinkerResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public LinkerResource update(String subscriptionId, String resourceGroupName, String location, String connectorName, - LinkerPatch parameters, Context context) { - LinkerResourceInner inner = this.serviceClient() - .update(subscriptionId, resourceGroupName, location, connectorName, parameters, context); - if (inner != null) { - return new LinkerResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public ValidateOperationResult validate(String subscriptionId, String resourceGroupName, String location, - String connectorName) { - ValidateOperationResultInner inner - = this.serviceClient().validate(subscriptionId, resourceGroupName, location, connectorName); - if (inner != null) { - return new ValidateOperationResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public ValidateOperationResult validate(String subscriptionId, String resourceGroupName, String location, - String connectorName, Context context) { - ValidateOperationResultInner inner - = this.serviceClient().validate(subscriptionId, resourceGroupName, location, connectorName, context); - if (inner != null) { - return new ValidateOperationResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response generateConfigurationsWithResponse(String subscriptionId, - String resourceGroupName, String location, String connectorName, ConfigurationInfo parameters, - Context context) { - Response inner = this.serviceClient() - .generateConfigurationsWithResponse(subscriptionId, resourceGroupName, location, connectorName, parameters, - context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ConfigurationResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ConfigurationResult generateConfigurations(String subscriptionId, String resourceGroupName, String location, - String connectorName) { - ConfigurationResultInner inner - = this.serviceClient().generateConfigurations(subscriptionId, resourceGroupName, location, connectorName); - if (inner != null) { - return new ConfigurationResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public DryrunResource getDryrunById(String id) { - String subscriptionId = ResourceManagerUtils.getValueFromIdByName(id, "subscriptions"); - if (subscriptionId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'subscriptions'.", 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 location = ResourceManagerUtils.getValueFromIdByName(id, "locations"); - if (location == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'locations'.", id))); - } - String dryrunName = ResourceManagerUtils.getValueFromIdByName(id, "dryruns"); - if (dryrunName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dryruns'.", id))); - } - return this.getDryrunWithResponse(subscriptionId, resourceGroupName, location, dryrunName, Context.NONE) - .getValue(); - } - - public Response getDryrunByIdWithResponse(String id, Context context) { - String subscriptionId = ResourceManagerUtils.getValueFromIdByName(id, "subscriptions"); - if (subscriptionId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'subscriptions'.", 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 location = ResourceManagerUtils.getValueFromIdByName(id, "locations"); - if (location == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'locations'.", id))); - } - String dryrunName = ResourceManagerUtils.getValueFromIdByName(id, "dryruns"); - if (dryrunName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dryruns'.", id))); - } - return this.getDryrunWithResponse(subscriptionId, resourceGroupName, location, dryrunName, context); - } - - public void deleteDryrunById(String id) { - String subscriptionId = ResourceManagerUtils.getValueFromIdByName(id, "subscriptions"); - if (subscriptionId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'subscriptions'.", 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 location = ResourceManagerUtils.getValueFromIdByName(id, "locations"); - if (location == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'locations'.", id))); - } - String dryrunName = ResourceManagerUtils.getValueFromIdByName(id, "dryruns"); - if (dryrunName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dryruns'.", id))); - } - this.deleteDryrunWithResponse(subscriptionId, resourceGroupName, location, dryrunName, Context.NONE); - } - - public Response deleteDryrunByIdWithResponse(String id, Context context) { - String subscriptionId = ResourceManagerUtils.getValueFromIdByName(id, "subscriptions"); - if (subscriptionId == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'subscriptions'.", 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 location = ResourceManagerUtils.getValueFromIdByName(id, "locations"); - if (location == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'locations'.", id))); - } - String dryrunName = ResourceManagerUtils.getValueFromIdByName(id, "dryruns"); - if (dryrunName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dryruns'.", id))); - } - return this.deleteDryrunWithResponse(subscriptionId, resourceGroupName, location, dryrunName, context); - } - - private ConnectorsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager() { - return this.serviceManager; - } - - public DryrunResourceImpl define(String name) { - return new DryrunResourceImpl(name, this.manager()); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/DaprConfigurationResourceImpl.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/DaprConfigurationResourceImpl.java deleted file mode 100644 index 4e005ba6d260c..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/DaprConfigurationResourceImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.implementation; - -import com.azure.resourcemanager.servicelinker.fluent.models.DaprConfigurationResourceInner; -import com.azure.resourcemanager.servicelinker.models.AuthType; -import com.azure.resourcemanager.servicelinker.models.DaprConfigurationResource; -import com.azure.resourcemanager.servicelinker.models.DaprProperties; - -public final class DaprConfigurationResourceImpl implements DaprConfigurationResource { - private DaprConfigurationResourceInner innerObject; - - private final com.azure.resourcemanager.servicelinker.ServiceLinkerManager serviceManager; - - DaprConfigurationResourceImpl(DaprConfigurationResourceInner innerObject, - com.azure.resourcemanager.servicelinker.ServiceLinkerManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String targetType() { - return this.innerModel().targetType(); - } - - public AuthType authType() { - return this.innerModel().authType(); - } - - public DaprProperties daprProperties() { - return this.innerModel().daprProperties(); - } - - public DaprConfigurationResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/DryrunResourceImpl.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/DryrunResourceImpl.java deleted file mode 100644 index 86cbc1cd24e36..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/DryrunResourceImpl.java +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.servicelinker.fluent.models.DryrunResourceInner; -import com.azure.resourcemanager.servicelinker.models.DryrunOperationPreview; -import com.azure.resourcemanager.servicelinker.models.DryrunParameters; -import com.azure.resourcemanager.servicelinker.models.DryrunPatch; -import com.azure.resourcemanager.servicelinker.models.DryrunPrerequisiteResult; -import com.azure.resourcemanager.servicelinker.models.DryrunResource; -import java.util.Collections; -import java.util.List; - -public final class DryrunResourceImpl implements DryrunResource, DryrunResource.Definition, DryrunResource.Update { - private DryrunResourceInner innerObject; - - private final com.azure.resourcemanager.servicelinker.ServiceLinkerManager 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 DryrunParameters parameters() { - return this.innerModel().parameters(); - } - - public List prerequisiteResults() { - List inner = this.innerModel().prerequisiteResults(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List operationPreviews() { - List inner = this.innerModel().operationPreviews(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String provisioningState() { - return this.innerModel().provisioningState(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public DryrunResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager() { - return this.serviceManager; - } - - private String subscriptionId; - - private String resourceGroupName; - - private String location; - - private String dryrunName; - - private DryrunPatch updateParameters; - - public DryrunResourceImpl withExistingLocation(String subscriptionId, String resourceGroupName, String location) { - this.subscriptionId = subscriptionId; - this.resourceGroupName = resourceGroupName; - this.location = location; - return this; - } - - public DryrunResource create() { - this.innerObject = serviceManager.serviceClient() - .getConnectors() - .createDryrun(subscriptionId, resourceGroupName, location, dryrunName, this.innerModel(), Context.NONE); - return this; - } - - public DryrunResource create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getConnectors() - .createDryrun(subscriptionId, resourceGroupName, location, dryrunName, this.innerModel(), context); - return this; - } - - DryrunResourceImpl(String name, com.azure.resourcemanager.servicelinker.ServiceLinkerManager serviceManager) { - this.innerObject = new DryrunResourceInner(); - this.serviceManager = serviceManager; - this.dryrunName = name; - } - - public DryrunResourceImpl update() { - this.updateParameters = new DryrunPatch(); - return this; - } - - public DryrunResource apply() { - this.innerObject = serviceManager.serviceClient() - .getConnectors() - .updateDryrun(subscriptionId, resourceGroupName, location, dryrunName, updateParameters, Context.NONE); - return this; - } - - public DryrunResource apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getConnectors() - .updateDryrun(subscriptionId, resourceGroupName, location, dryrunName, updateParameters, context); - return this; - } - - DryrunResourceImpl(DryrunResourceInner innerObject, - com.azure.resourcemanager.servicelinker.ServiceLinkerManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.subscriptionId = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "subscriptions"); - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourcegroups"); - this.location = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "locations"); - this.dryrunName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "dryruns"); - } - - public DryrunResource refresh() { - this.innerObject = serviceManager.serviceClient() - .getConnectors() - .getDryrunWithResponse(subscriptionId, resourceGroupName, location, dryrunName, Context.NONE) - .getValue(); - return this; - } - - public DryrunResource refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getConnectors() - .getDryrunWithResponse(subscriptionId, resourceGroupName, location, dryrunName, context) - .getValue(); - return this; - } - - public DryrunResourceImpl withParameters(DryrunParameters parameters) { - if (isInCreateMode()) { - this.innerModel().withParameters(parameters); - return this; - } else { - this.updateParameters.withParameters(parameters); - return this; - } - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/LinkerResourceImpl.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/LinkerResourceImpl.java index 376f49894a2ed..bc441c1a1fff3 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/LinkerResourceImpl.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/LinkerResourceImpl.java @@ -10,12 +10,10 @@ import com.azure.resourcemanager.servicelinker.fluent.models.LinkerResourceInner; import com.azure.resourcemanager.servicelinker.models.AuthInfoBase; import com.azure.resourcemanager.servicelinker.models.ClientType; -import com.azure.resourcemanager.servicelinker.models.ConfigurationInfo; -import com.azure.resourcemanager.servicelinker.models.ConfigurationResult; import com.azure.resourcemanager.servicelinker.models.LinkerPatch; import com.azure.resourcemanager.servicelinker.models.LinkerResource; -import com.azure.resourcemanager.servicelinker.models.PublicNetworkSolution; import com.azure.resourcemanager.servicelinker.models.SecretStore; +import com.azure.resourcemanager.servicelinker.models.SourceConfigurationResult; import com.azure.resourcemanager.servicelinker.models.TargetServiceBase; import com.azure.resourcemanager.servicelinker.models.VNetSolution; import com.azure.resourcemanager.servicelinker.models.ValidateOperationResult; @@ -69,14 +67,6 @@ public String scope() { return this.innerModel().scope(); } - public PublicNetworkSolution publicNetworkSolution() { - return this.innerModel().publicNetworkSolution(); - } - - public ConfigurationInfo configurationInfo() { - return this.innerModel().configurationInfo(); - } - public LinkerResourceInner innerModel() { return this.innerObject; } @@ -166,11 +156,11 @@ public ValidateOperationResult validate(Context context) { return serviceManager.linkers().validate(resourceUri, linkerName, context); } - public Response listConfigurationsWithResponse(Context context) { + public Response listConfigurationsWithResponse(Context context) { return serviceManager.linkers().listConfigurationsWithResponse(resourceUri, linkerName, context); } - public ConfigurationResult listConfigurations() { + public SourceConfigurationResult listConfigurations() { return serviceManager.linkers().listConfigurations(resourceUri, linkerName); } @@ -234,26 +224,6 @@ public LinkerResourceImpl withScope(String scope) { } } - public LinkerResourceImpl withPublicNetworkSolution(PublicNetworkSolution publicNetworkSolution) { - if (isInCreateMode()) { - this.innerModel().withPublicNetworkSolution(publicNetworkSolution); - return this; - } else { - this.updateParameters.withPublicNetworkSolution(publicNetworkSolution); - return this; - } - } - - public LinkerResourceImpl withConfigurationInfo(ConfigurationInfo configurationInfo) { - if (isInCreateMode()) { - this.innerModel().withConfigurationInfo(configurationInfo); - return this; - } else { - this.updateParameters.withConfigurationInfo(configurationInfo); - return this; - } - } - private boolean isInCreateMode() { return this.innerModel().id() == null; } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/LinkersClientImpl.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/LinkersClientImpl.java index 6057c315b0df6..b4f54a2015f5c 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/LinkersClientImpl.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/LinkersClientImpl.java @@ -34,11 +34,11 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.servicelinker.fluent.LinkersClient; -import com.azure.resourcemanager.servicelinker.fluent.models.ConfigurationResultInner; import com.azure.resourcemanager.servicelinker.fluent.models.LinkerResourceInner; +import com.azure.resourcemanager.servicelinker.fluent.models.SourceConfigurationResultInner; import com.azure.resourcemanager.servicelinker.fluent.models.ValidateOperationResultInner; +import com.azure.resourcemanager.servicelinker.models.LinkerList; import com.azure.resourcemanager.servicelinker.models.LinkerPatch; -import com.azure.resourcemanager.servicelinker.models.ResourceList; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -78,7 +78,7 @@ public interface LinkersService { @Get("/{resourceUri}/providers/Microsoft.ServiceLinker/linkers") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @PathParam(value = "resourceUri", encoded = true) String resourceUri, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); @@ -133,7 +133,7 @@ Mono>> validate(@HostParam("$host") String endpoint, @Post("/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}/listConfigurations") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listConfigurations(@HostParam("$host") String endpoint, + Mono> listConfigurations(@HostParam("$host") String endpoint, @PathParam(value = "resourceUri", encoded = true) String resourceUri, @QueryParam("api-version") String apiVersion, @PathParam("linkerName") String linkerName, @HeaderParam("Accept") String accept, Context context); @@ -142,13 +142,12 @@ Mono> listConfigurations(@HostParam("$host") @Get("{nextLink}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** - * Returns list of Linkers which connects to the resource. which supports to config both application and target - * service during the resource provision. + * Returns list of Linkers which connects to the resource. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -175,8 +174,7 @@ private Mono> listSinglePageAsync(String reso } /** - * Returns list of Linkers which connects to the resource. which supports to config both application and target - * service during the resource provision. + * Returns list of Linkers which connects to the resource. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param context The context to associate with this operation. @@ -202,8 +200,7 @@ private Mono> listSinglePageAsync(String reso } /** - * Returns list of Linkers which connects to the resource. which supports to config both application and target - * service during the resource provision. + * Returns list of Linkers which connects to the resource. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -217,8 +214,7 @@ private PagedFlux listAsync(String resourceUri) { } /** - * Returns list of Linkers which connects to the resource. which supports to config both application and target - * service during the resource provision. + * Returns list of Linkers which connects to the resource. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param context The context to associate with this operation. @@ -234,8 +230,7 @@ private PagedFlux listAsync(String resourceUri, Context con } /** - * Returns list of Linkers which connects to the resource. which supports to config both application and target - * service during the resource provision. + * Returns list of Linkers which connects to the resource. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -249,8 +244,7 @@ public PagedIterable list(String resourceUri) { } /** - * Returns list of Linkers which connects to the resource. which supports to config both application and target - * service during the resource provision. + * Returns list of Linkers which connects to the resource. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param context The context to associate with this operation. @@ -372,7 +366,7 @@ public LinkerResourceInner get(String resourceUri, String linkerName) { } /** - * Create or update Linker resource. + * Create or update linker resource. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -409,7 +403,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } /** - * Create or update Linker resource. + * Create or update linker resource. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -446,7 +440,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } /** - * Create or update Linker resource. + * Create or update linker resource. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -465,7 +459,7 @@ private Mono>> createOrUpdateWithResponseAsync(String } /** - * Create or update Linker resource. + * Create or update linker resource. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -487,7 +481,7 @@ private PollerFlux, LinkerResourceInner> beginCr } /** - * Create or update Linker resource. + * Create or update linker resource. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -504,7 +498,7 @@ public SyncPoller, LinkerResourceInner> beginCre } /** - * Create or update Linker resource. + * Create or update linker resource. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -522,7 +516,7 @@ public SyncPoller, LinkerResourceInner> beginCre } /** - * Create or update Linker resource. + * Create or update linker resource. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -540,7 +534,7 @@ private Mono createOrUpdateAsync(String resourceUri, String } /** - * Create or update Linker resource. + * Create or update linker resource. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -559,7 +553,7 @@ private Mono createOrUpdateAsync(String resourceUri, String } /** - * Create or update Linker resource. + * Create or update linker resource. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -575,7 +569,7 @@ public LinkerResourceInner createOrUpdate(String resourceUri, String linkerName, } /** - * Create or update Linker resource. + * Create or update linker resource. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -593,7 +587,7 @@ public LinkerResourceInner createOrUpdate(String resourceUri, String linkerName, } /** - * Delete a Linker. + * Delete a link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -622,7 +616,7 @@ private Mono>> deleteWithResponseAsync(String resource } /** - * Delete a Linker. + * Delete a link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -652,7 +646,7 @@ private Mono>> deleteWithResponseAsync(String resource } /** - * Delete a Linker. + * Delete a link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -669,7 +663,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceUri, } /** - * Delete a Linker. + * Delete a link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -689,7 +683,7 @@ private PollerFlux, Void> beginDeleteAsync(String resourceUri, } /** - * Delete a Linker. + * Delete a link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -704,7 +698,7 @@ public SyncPoller, Void> beginDelete(String resourceUri, String } /** - * Delete a Linker. + * Delete a link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -720,7 +714,7 @@ public SyncPoller, Void> beginDelete(String resourceUri, String } /** - * Delete a Linker. + * Delete a link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -735,7 +729,7 @@ private Mono deleteAsync(String resourceUri, String linkerName) { } /** - * Delete a Linker. + * Delete a link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -751,7 +745,7 @@ private Mono deleteAsync(String resourceUri, String linkerName, Context co } /** - * Delete a Linker. + * Delete a link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -765,7 +759,7 @@ public void delete(String resourceUri, String linkerName) { } /** - * Delete a Linker. + * Delete a link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -780,7 +774,7 @@ public void delete(String resourceUri, String linkerName, Context context) { } /** - * Operation to update an existing Linker. + * Operation to update an existing link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -817,7 +811,7 @@ private Mono>> updateWithResponseAsync(String resource } /** - * Operation to update an existing Linker. + * Operation to update an existing link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -854,7 +848,7 @@ private Mono>> updateWithResponseAsync(String resource } /** - * Operation to update an existing Linker. + * Operation to update an existing link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -873,7 +867,7 @@ private PollerFlux, LinkerResourceInner> beginUp } /** - * Operation to update an existing Linker. + * Operation to update an existing link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -894,7 +888,7 @@ private PollerFlux, LinkerResourceInner> beginUp } /** - * Operation to update an existing Linker. + * Operation to update an existing link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -911,7 +905,7 @@ public SyncPoller, LinkerResourceInner> beginUpd } /** - * Operation to update an existing Linker. + * Operation to update an existing link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -929,7 +923,7 @@ public SyncPoller, LinkerResourceInner> beginUpd } /** - * Operation to update an existing Linker. + * Operation to update an existing link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -946,7 +940,7 @@ private Mono updateAsync(String resourceUri, String linkerN } /** - * Operation to update an existing Linker. + * Operation to update an existing link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -965,7 +959,7 @@ private Mono updateAsync(String resourceUri, String linkerN } /** - * Operation to update an existing Linker. + * Operation to update an existing link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -981,7 +975,7 @@ public LinkerResourceInner update(String resourceUri, String linkerName, LinkerP } /** - * Operation to update an existing Linker. + * Operation to update an existing link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -998,14 +992,14 @@ public LinkerResourceInner update(String resourceUri, String linkerName, LinkerP } /** - * Validate a Linker. + * Validate a link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker 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 validation operation result for a Linker along with {@link Response} on successful completion of + * @return the validation operation result for a linker along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1028,7 +1022,7 @@ private Mono>> validateWithResponseAsync(String resour } /** - * Validate a Linker. + * Validate a link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -1036,7 +1030,7 @@ private Mono>> validateWithResponseAsync(String resour * @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 validation operation result for a Linker along with {@link Response} on successful completion of + * @return the validation operation result for a linker along with {@link Response} on successful completion of * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -1059,14 +1053,14 @@ private Mono>> validateWithResponseAsync(String resour } /** - * Validate a Linker. + * Validate a link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker 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 PollerFlux} for polling of the validation operation result for a Linker. + * @return the {@link PollerFlux} for polling of the validation operation result for a linker. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ValidateOperationResultInner> @@ -1078,7 +1072,7 @@ private Mono>> validateWithResponseAsync(String resour } /** - * Validate a Linker. + * Validate a link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -1086,7 +1080,7 @@ private Mono>> validateWithResponseAsync(String resour * @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 validation operation result for a Linker. + * @return the {@link PollerFlux} for polling of the validation operation result for a linker. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ValidateOperationResultInner> @@ -1099,14 +1093,14 @@ private Mono>> validateWithResponseAsync(String resour } /** - * Validate a Linker. + * Validate a link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker 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 SyncPoller} for polling of the validation operation result for a Linker. + * @return the {@link SyncPoller} for polling of the validation operation result for a linker. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ValidateOperationResultInner> @@ -1115,7 +1109,7 @@ private Mono>> validateWithResponseAsync(String resour } /** - * Validate a Linker. + * Validate a link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -1123,7 +1117,7 @@ private Mono>> validateWithResponseAsync(String resour * @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 validation operation result for a Linker. + * @return the {@link SyncPoller} for polling of the validation operation result for a linker. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ValidateOperationResultInner> @@ -1132,14 +1126,14 @@ private Mono>> validateWithResponseAsync(String resour } /** - * Validate a Linker. + * Validate a link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker 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 validation operation result for a Linker on successful completion of {@link Mono}. + * @return the validation operation result for a linker on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono validateAsync(String resourceUri, String linkerName) { @@ -1147,7 +1141,7 @@ private Mono validateAsync(String resourceUri, Str } /** - * Validate a Linker. + * Validate a link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -1155,7 +1149,7 @@ private Mono validateAsync(String resourceUri, 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 validation operation result for a Linker on successful completion of {@link Mono}. + * @return the validation operation result for a linker on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono validateAsync(String resourceUri, String linkerName, Context context) { @@ -1164,14 +1158,14 @@ private Mono validateAsync(String resourceUri, Str } /** - * Validate a Linker. + * Validate a link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker 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 validation operation result for a Linker. + * @return the validation operation result for a linker. */ @ServiceMethod(returns = ReturnType.SINGLE) public ValidateOperationResultInner validate(String resourceUri, String linkerName) { @@ -1179,7 +1173,7 @@ public ValidateOperationResultInner validate(String resourceUri, String linkerNa } /** - * Validate a Linker. + * Validate a link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -1187,7 +1181,7 @@ public ValidateOperationResultInner validate(String resourceUri, String linkerNa * @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 validation operation result for a Linker. + * @return the validation operation result for a linker. */ @ServiceMethod(returns = ReturnType.SINGLE) public ValidateOperationResultInner validate(String resourceUri, String linkerName, Context context) { @@ -1195,7 +1189,7 @@ public ValidateOperationResultInner validate(String resourceUri, String linkerNa } /** - * list source configurations for a Linker. + * list source configurations for a linker. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -1206,7 +1200,7 @@ public ValidateOperationResultInner validate(String resourceUri, String linkerNa * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listConfigurationsWithResponseAsync(String resourceUri, + private Mono> listConfigurationsWithResponseAsync(String resourceUri, String linkerName) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -1226,7 +1220,7 @@ private Mono> listConfigurationsWithResponseA } /** - * list source configurations for a Linker. + * list source configurations for a linker. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -1238,7 +1232,7 @@ private Mono> listConfigurationsWithResponseA * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listConfigurationsWithResponseAsync(String resourceUri, + private Mono> listConfigurationsWithResponseAsync(String resourceUri, String linkerName, Context context) { if (this.client.getEndpoint() == null) { return Mono.error( @@ -1257,7 +1251,7 @@ private Mono> listConfigurationsWithResponseA } /** - * list source configurations for a Linker. + * list source configurations for a linker. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -1268,13 +1262,13 @@ private Mono> listConfigurationsWithResponseA * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listConfigurationsAsync(String resourceUri, String linkerName) { + private Mono listConfigurationsAsync(String resourceUri, String linkerName) { return listConfigurationsWithResponseAsync(resourceUri, linkerName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** - * list source configurations for a Linker. + * list source configurations for a linker. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -1286,13 +1280,13 @@ private Mono listConfigurationsAsync(String resourceUr * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listConfigurationsWithResponse(String resourceUri, String linkerName, - Context context) { + public Response listConfigurationsWithResponse(String resourceUri, + String linkerName, Context context) { return listConfigurationsWithResponseAsync(resourceUri, linkerName, context).block(); } /** - * list source configurations for a Linker. + * list source configurations for a linker. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -1302,7 +1296,7 @@ public Response listConfigurationsWithResponse(String * @return configurations for source resource, include appSettings, connectionString and serviceBindings. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ConfigurationResultInner listConfigurations(String resourceUri, String linkerName) { + public SourceConfigurationResultInner listConfigurations(String resourceUri, String linkerName) { return listConfigurationsWithResponse(resourceUri, linkerName, Context.NONE).getValue(); } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/LinkersImpl.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/LinkersImpl.java index 6b9365c85caef..4f25dfa837cb1 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/LinkersImpl.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/LinkersImpl.java @@ -10,12 +10,12 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.servicelinker.fluent.LinkersClient; -import com.azure.resourcemanager.servicelinker.fluent.models.ConfigurationResultInner; import com.azure.resourcemanager.servicelinker.fluent.models.LinkerResourceInner; +import com.azure.resourcemanager.servicelinker.fluent.models.SourceConfigurationResultInner; import com.azure.resourcemanager.servicelinker.fluent.models.ValidateOperationResultInner; -import com.azure.resourcemanager.servicelinker.models.ConfigurationResult; import com.azure.resourcemanager.servicelinker.models.LinkerResource; import com.azure.resourcemanager.servicelinker.models.Linkers; +import com.azure.resourcemanager.servicelinker.models.SourceConfigurationResult; import com.azure.resourcemanager.servicelinker.models.ValidateOperationResult; public final class LinkersImpl implements Linkers { @@ -86,22 +86,22 @@ public ValidateOperationResult validate(String resourceUri, String linkerName, C } } - public Response listConfigurationsWithResponse(String resourceUri, String linkerName, + public Response listConfigurationsWithResponse(String resourceUri, String linkerName, Context context) { - Response inner + Response inner = this.serviceClient().listConfigurationsWithResponse(resourceUri, linkerName, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ConfigurationResultImpl(inner.getValue(), this.manager())); + new SourceConfigurationResultImpl(inner.getValue(), this.manager())); } else { return null; } } - public ConfigurationResult listConfigurations(String resourceUri, String linkerName) { - ConfigurationResultInner inner = this.serviceClient().listConfigurations(resourceUri, linkerName); + public SourceConfigurationResult listConfigurations(String resourceUri, String linkerName) { + SourceConfigurationResultInner inner = this.serviceClient().listConfigurations(resourceUri, linkerName); if (inner != null) { - return new ConfigurationResultImpl(inner, this.manager()); + return new SourceConfigurationResultImpl(inner, this.manager()); } else { return null; } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/LinkersOperationsClientImpl.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/LinkersOperationsClientImpl.java deleted file mode 100644 index 6f62a582ceb82..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/LinkersOperationsClientImpl.java +++ /dev/null @@ -1,1268 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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.Patch; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Post; -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.management.polling.PollResult; -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.servicelinker.fluent.LinkersOperationsClient; -import com.azure.resourcemanager.servicelinker.fluent.models.ConfigurationResultInner; -import com.azure.resourcemanager.servicelinker.fluent.models.DaprConfigurationResourceInner; -import com.azure.resourcemanager.servicelinker.fluent.models.DryrunResourceInner; -import com.azure.resourcemanager.servicelinker.models.ConfigurationInfo; -import com.azure.resourcemanager.servicelinker.models.DaprConfigurationList; -import com.azure.resourcemanager.servicelinker.models.DryrunList; -import com.azure.resourcemanager.servicelinker.models.DryrunPatch; -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 LinkersOperationsClient. - */ -public final class LinkersOperationsClientImpl implements LinkersOperationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final LinkersOperationsService service; - - /** - * The service client containing this operation class. - */ - private final ServiceLinkerManagementClientImpl client; - - /** - * Initializes an instance of LinkersOperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - LinkersOperationsClientImpl(ServiceLinkerManagementClientImpl client) { - this.service - = RestProxy.create(LinkersOperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ServiceLinkerManagementClientLinkersOperations to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ServiceLinkerManagem") - public interface LinkersOperationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/{resourceUri}/providers/Microsoft.ServiceLinker/dryruns") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listDryrun(@HostParam("$host") String endpoint, - @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/{resourceUri}/providers/Microsoft.ServiceLinker/dryruns/{dryrunName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getDryrun(@HostParam("$host") String endpoint, - @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @QueryParam("api-version") String apiVersion, @PathParam("dryrunName") String dryrunName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/{resourceUri}/providers/Microsoft.ServiceLinker/dryruns/{dryrunName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createDryrun(@HostParam("$host") String endpoint, - @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @QueryParam("api-version") String apiVersion, @PathParam("dryrunName") String dryrunName, - @BodyParam("application/json") DryrunResourceInner parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/{resourceUri}/providers/Microsoft.ServiceLinker/dryruns/{dryrunName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> updateDryrun(@HostParam("$host") String endpoint, - @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @QueryParam("api-version") String apiVersion, @PathParam("dryrunName") String dryrunName, - @BodyParam("application/json") DryrunPatch parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/{resourceUri}/providers/Microsoft.ServiceLinker/dryruns/{dryrunName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> deleteDryrun(@HostParam("$host") String endpoint, - @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @QueryParam("api-version") String apiVersion, @PathParam("dryrunName") String dryrunName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}/generateConfigurations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> generateConfigurations(@HostParam("$host") String endpoint, - @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @QueryParam("api-version") String apiVersion, @PathParam("linkerName") String linkerName, - @BodyParam("application/json") ConfigurationInfo parameters, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/{resourceUri}/providers/Microsoft.ServiceLinker/daprConfigurations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listDaprConfigurations(@HostParam("$host") String endpoint, - @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listDryrunNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listDaprConfigurationsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * list dryrun jobs. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @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 dryrun along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDryrunSinglePageAsync(String resourceUri) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceUri == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listDryrun(this.client.getEndpoint(), resourceUri, - 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())); - } - - /** - * list dryrun jobs. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @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 dryrun along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDryrunSinglePageAsync(String resourceUri, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceUri == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listDryrun(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * list dryrun jobs. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @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 dryrun as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDryrunAsync(String resourceUri) { - return new PagedFlux<>(() -> listDryrunSinglePageAsync(resourceUri), - nextLink -> listDryrunNextSinglePageAsync(nextLink)); - } - - /** - * list dryrun jobs. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @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 dryrun as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDryrunAsync(String resourceUri, Context context) { - return new PagedFlux<>(() -> listDryrunSinglePageAsync(resourceUri, context), - nextLink -> listDryrunNextSinglePageAsync(nextLink, context)); - } - - /** - * list dryrun jobs. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @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 dryrun as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDryrun(String resourceUri) { - return new PagedIterable<>(listDryrunAsync(resourceUri)); - } - - /** - * list dryrun jobs. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @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 dryrun as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDryrun(String resourceUri, Context context) { - return new PagedIterable<>(listDryrunAsync(resourceUri, context)); - } - - /** - * get a dryrun job. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @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 dryrun job along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDryrunWithResponseAsync(String resourceUri, String dryrunName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceUri == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); - } - if (dryrunName == null) { - return Mono.error(new IllegalArgumentException("Parameter dryrunName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getDryrun(this.client.getEndpoint(), resourceUri, - this.client.getApiVersion(), dryrunName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * get a dryrun job. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @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 dryrun job along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDryrunWithResponseAsync(String resourceUri, String dryrunName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceUri == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); - } - if (dryrunName == null) { - return Mono.error(new IllegalArgumentException("Parameter dryrunName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getDryrun(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), dryrunName, - accept, context); - } - - /** - * get a dryrun job. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @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 dryrun job on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getDryrunAsync(String resourceUri, String dryrunName) { - return getDryrunWithResponseAsync(resourceUri, dryrunName).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * get a dryrun job. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @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 dryrun job along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDryrunWithResponse(String resourceUri, String dryrunName, Context context) { - return getDryrunWithResponseAsync(resourceUri, dryrunName, context).block(); - } - - /** - * get a dryrun job. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @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 dryrun job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DryrunResourceInner getDryrun(String resourceUri, String dryrunName) { - return getDryrunWithResponse(resourceUri, dryrunName, Context.NONE).getValue(); - } - - /** - * create a dryrun job to do necessary check before actual creation. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createDryrunWithResponseAsync(String resourceUri, String dryrunName, - DryrunResourceInner parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceUri == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); - } - if (dryrunName == null) { - return Mono.error(new IllegalArgumentException("Parameter dryrunName 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"; - return FluxUtil - .withContext(context -> service.createDryrun(this.client.getEndpoint(), resourceUri, - this.client.getApiVersion(), dryrunName, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * create a dryrun job to do necessary check before actual creation. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createDryrunWithResponseAsync(String resourceUri, String dryrunName, - DryrunResourceInner parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceUri == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); - } - if (dryrunName == null) { - return Mono.error(new IllegalArgumentException("Parameter dryrunName 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.createDryrun(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), dryrunName, - parameters, accept, context); - } - - /** - * create a dryrun job to do necessary check before actual creation. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 PollerFlux} for polling of a dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DryrunResourceInner> beginCreateDryrunAsync(String resourceUri, - String dryrunName, DryrunResourceInner parameters) { - Mono>> mono = createDryrunWithResponseAsync(resourceUri, dryrunName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DryrunResourceInner.class, DryrunResourceInner.class, this.client.getContext()); - } - - /** - * create a dryrun job to do necessary check before actual creation. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 PollerFlux} for polling of a dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DryrunResourceInner> beginCreateDryrunAsync(String resourceUri, - String dryrunName, DryrunResourceInner parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createDryrunWithResponseAsync(resourceUri, dryrunName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DryrunResourceInner.class, DryrunResourceInner.class, context); - } - - /** - * create a dryrun job to do necessary check before actual creation. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 SyncPoller} for polling of a dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DryrunResourceInner> beginCreateDryrun(String resourceUri, - String dryrunName, DryrunResourceInner parameters) { - return this.beginCreateDryrunAsync(resourceUri, dryrunName, parameters).getSyncPoller(); - } - - /** - * create a dryrun job to do necessary check before actual creation. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 SyncPoller} for polling of a dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DryrunResourceInner> beginCreateDryrun(String resourceUri, - String dryrunName, DryrunResourceInner parameters, Context context) { - return this.beginCreateDryrunAsync(resourceUri, dryrunName, parameters, context).getSyncPoller(); - } - - /** - * create a dryrun job to do necessary check before actual creation. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createDryrunAsync(String resourceUri, String dryrunName, - DryrunResourceInner parameters) { - return beginCreateDryrunAsync(resourceUri, dryrunName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * create a dryrun job to do necessary check before actual creation. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createDryrunAsync(String resourceUri, String dryrunName, - DryrunResourceInner parameters, Context context) { - return beginCreateDryrunAsync(resourceUri, dryrunName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * create a dryrun job to do necessary check before actual creation. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DryrunResourceInner createDryrun(String resourceUri, String dryrunName, DryrunResourceInner parameters) { - return createDryrunAsync(resourceUri, dryrunName, parameters).block(); - } - - /** - * create a dryrun job to do necessary check before actual creation. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DryrunResourceInner createDryrun(String resourceUri, String dryrunName, DryrunResourceInner parameters, - Context context) { - return createDryrunAsync(resourceUri, dryrunName, parameters, context).block(); - } - - /** - * add a dryrun job to do necessary check before actual creation. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateDryrunWithResponseAsync(String resourceUri, String dryrunName, - DryrunPatch parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceUri == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); - } - if (dryrunName == null) { - return Mono.error(new IllegalArgumentException("Parameter dryrunName 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"; - return FluxUtil - .withContext(context -> service.updateDryrun(this.client.getEndpoint(), resourceUri, - this.client.getApiVersion(), dryrunName, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * add a dryrun job to do necessary check before actual creation. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateDryrunWithResponseAsync(String resourceUri, String dryrunName, - DryrunPatch parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceUri == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); - } - if (dryrunName == null) { - return Mono.error(new IllegalArgumentException("Parameter dryrunName 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.updateDryrun(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), dryrunName, - parameters, accept, context); - } - - /** - * add a dryrun job to do necessary check before actual creation. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 PollerFlux} for polling of a dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DryrunResourceInner> beginUpdateDryrunAsync(String resourceUri, - String dryrunName, DryrunPatch parameters) { - Mono>> mono = updateDryrunWithResponseAsync(resourceUri, dryrunName, parameters); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DryrunResourceInner.class, DryrunResourceInner.class, this.client.getContext()); - } - - /** - * add a dryrun job to do necessary check before actual creation. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 PollerFlux} for polling of a dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DryrunResourceInner> beginUpdateDryrunAsync(String resourceUri, - String dryrunName, DryrunPatch parameters, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateDryrunWithResponseAsync(resourceUri, dryrunName, parameters, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DryrunResourceInner.class, DryrunResourceInner.class, context); - } - - /** - * add a dryrun job to do necessary check before actual creation. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 SyncPoller} for polling of a dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DryrunResourceInner> beginUpdateDryrun(String resourceUri, - String dryrunName, DryrunPatch parameters) { - return this.beginUpdateDryrunAsync(resourceUri, dryrunName, parameters).getSyncPoller(); - } - - /** - * add a dryrun job to do necessary check before actual creation. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 SyncPoller} for polling of a dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DryrunResourceInner> beginUpdateDryrun(String resourceUri, - String dryrunName, DryrunPatch parameters, Context context) { - return this.beginUpdateDryrunAsync(resourceUri, dryrunName, parameters, context).getSyncPoller(); - } - - /** - * add a dryrun job to do necessary check before actual creation. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateDryrunAsync(String resourceUri, String dryrunName, DryrunPatch parameters) { - return beginUpdateDryrunAsync(resourceUri, dryrunName, parameters).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * add a dryrun job to do necessary check before actual creation. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateDryrunAsync(String resourceUri, String dryrunName, DryrunPatch parameters, - Context context) { - return beginUpdateDryrunAsync(resourceUri, dryrunName, parameters, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * add a dryrun job to do necessary check before actual creation. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DryrunResourceInner updateDryrun(String resourceUri, String dryrunName, DryrunPatch parameters) { - return updateDryrunAsync(resourceUri, dryrunName, parameters).block(); - } - - /** - * add a dryrun job to do necessary check before actual creation. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DryrunResourceInner updateDryrun(String resourceUri, String dryrunName, DryrunPatch parameters, - Context context) { - return updateDryrunAsync(resourceUri, dryrunName, parameters, context).block(); - } - - /** - * delete a dryrun job. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @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> deleteDryrunWithResponseAsync(String resourceUri, String dryrunName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceUri == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); - } - if (dryrunName == null) { - return Mono.error(new IllegalArgumentException("Parameter dryrunName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.deleteDryrun(this.client.getEndpoint(), resourceUri, - this.client.getApiVersion(), dryrunName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * delete a dryrun job. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @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> deleteDryrunWithResponseAsync(String resourceUri, String dryrunName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceUri == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); - } - if (dryrunName == null) { - return Mono.error(new IllegalArgumentException("Parameter dryrunName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.deleteDryrun(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), dryrunName, - accept, context); - } - - /** - * delete a dryrun job. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @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 deleteDryrunAsync(String resourceUri, String dryrunName) { - return deleteDryrunWithResponseAsync(resourceUri, dryrunName).flatMap(ignored -> Mono.empty()); - } - - /** - * delete a dryrun job. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @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 deleteDryrunWithResponse(String resourceUri, String dryrunName, Context context) { - return deleteDryrunWithResponseAsync(resourceUri, dryrunName, context).block(); - } - - /** - * delete a dryrun job. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @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 deleteDryrun(String resourceUri, String dryrunName) { - deleteDryrunWithResponse(resourceUri, dryrunName, Context.NONE); - } - - /** - * Generate configurations for a Linker. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param linkerName The name Linker resource. - * @param parameters Connection Info, including format, secret store, etc. - * @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 configurations for source resource, include appSettings, connectionString and serviceBindings along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> generateConfigurationsWithResponseAsync(String resourceUri, - String linkerName, ConfigurationInfo parameters) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceUri == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); - } - if (linkerName == null) { - return Mono.error(new IllegalArgumentException("Parameter linkerName is required and cannot be null.")); - } - if (parameters != null) { - parameters.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.generateConfigurations(this.client.getEndpoint(), resourceUri, - this.client.getApiVersion(), linkerName, parameters, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Generate configurations for a Linker. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param linkerName The name Linker resource. - * @param parameters Connection Info, including format, secret store, etc. - * @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 configurations for source resource, include appSettings, connectionString and serviceBindings along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> generateConfigurationsWithResponseAsync(String resourceUri, - String linkerName, ConfigurationInfo parameters, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceUri == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); - } - if (linkerName == null) { - return Mono.error(new IllegalArgumentException("Parameter linkerName is required and cannot be null.")); - } - if (parameters != null) { - parameters.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.generateConfigurations(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), - linkerName, parameters, accept, context); - } - - /** - * Generate configurations for a Linker. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param linkerName The name Linker 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 configurations for source resource, include appSettings, connectionString and serviceBindings on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono generateConfigurationsAsync(String resourceUri, String linkerName) { - final ConfigurationInfo parameters = null; - return generateConfigurationsWithResponseAsync(resourceUri, linkerName, parameters) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Generate configurations for a Linker. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param linkerName The name Linker resource. - * @param parameters Connection Info, including format, secret store, etc. - * @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 configurations for source resource, include appSettings, connectionString and serviceBindings along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response generateConfigurationsWithResponse(String resourceUri, String linkerName, - ConfigurationInfo parameters, Context context) { - return generateConfigurationsWithResponseAsync(resourceUri, linkerName, parameters, context).block(); - } - - /** - * Generate configurations for a Linker. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param linkerName The name Linker 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 configurations for source resource, include appSettings, connectionString and serviceBindings. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ConfigurationResultInner generateConfigurations(String resourceUri, String linkerName) { - final ConfigurationInfo parameters = null; - return generateConfigurationsWithResponse(resourceUri, linkerName, parameters, Context.NONE).getValue(); - } - - /** - * List the dapr configuration supported by Service Connector. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @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 dapr configuration list supported by Service Connector along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listDaprConfigurationsSinglePageAsync(String resourceUri) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceUri == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listDaprConfigurations(this.client.getEndpoint(), resourceUri, - 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())); - } - - /** - * List the dapr configuration supported by Service Connector. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @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 dapr configuration list supported by Service Connector along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listDaprConfigurationsSinglePageAsync(String resourceUri, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (resourceUri == null) { - return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listDaprConfigurations(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List the dapr configuration supported by Service Connector. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @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 dapr configuration list supported by Service Connector as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDaprConfigurationsAsync(String resourceUri) { - return new PagedFlux<>(() -> listDaprConfigurationsSinglePageAsync(resourceUri), - nextLink -> listDaprConfigurationsNextSinglePageAsync(nextLink)); - } - - /** - * List the dapr configuration supported by Service Connector. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @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 dapr configuration list supported by Service Connector as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDaprConfigurationsAsync(String resourceUri, Context context) { - return new PagedFlux<>(() -> listDaprConfigurationsSinglePageAsync(resourceUri, context), - nextLink -> listDaprConfigurationsNextSinglePageAsync(nextLink, context)); - } - - /** - * List the dapr configuration supported by Service Connector. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @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 dapr configuration list supported by Service Connector as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDaprConfigurations(String resourceUri) { - return new PagedIterable<>(listDaprConfigurationsAsync(resourceUri)); - } - - /** - * List the dapr configuration supported by Service Connector. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @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 dapr configuration list supported by Service Connector as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDaprConfigurations(String resourceUri, Context context) { - return new PagedIterable<>(listDaprConfigurationsAsync(resourceUri, 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 the list of dryrun along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDryrunNextSinglePageAsync(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.listDryrunNext(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. - * @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 dryrun along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDryrunNextSinglePageAsync(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.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listDryrunNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> 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. - * @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 dapr configuration list supported by Service Connector along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listDaprConfigurationsNextSinglePageAsync(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.listDaprConfigurationsNext(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. - * @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 dapr configuration list supported by Service Connector along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listDaprConfigurationsNextSinglePageAsync(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.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listDaprConfigurationsNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/LinkersOperationsImpl.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/LinkersOperationsImpl.java deleted file mode 100644 index 747c3f166a30d..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/LinkersOperationsImpl.java +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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.servicelinker.fluent.LinkersOperationsClient; -import com.azure.resourcemanager.servicelinker.fluent.models.ConfigurationResultInner; -import com.azure.resourcemanager.servicelinker.fluent.models.DaprConfigurationResourceInner; -import com.azure.resourcemanager.servicelinker.fluent.models.DryrunResourceInner; -import com.azure.resourcemanager.servicelinker.models.ConfigurationInfo; -import com.azure.resourcemanager.servicelinker.models.ConfigurationResult; -import com.azure.resourcemanager.servicelinker.models.DaprConfigurationResource; -import com.azure.resourcemanager.servicelinker.models.DryrunPatch; -import com.azure.resourcemanager.servicelinker.models.DryrunResource; -import com.azure.resourcemanager.servicelinker.models.LinkersOperations; - -public final class LinkersOperationsImpl implements LinkersOperations { - private static final ClientLogger LOGGER = new ClientLogger(LinkersOperationsImpl.class); - - private final LinkersOperationsClient innerClient; - - private final com.azure.resourcemanager.servicelinker.ServiceLinkerManager serviceManager; - - public LinkersOperationsImpl(LinkersOperationsClient innerClient, - com.azure.resourcemanager.servicelinker.ServiceLinkerManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listDryrun(String resourceUri) { - PagedIterable inner = this.serviceClient().listDryrun(resourceUri); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DryrunResourceImpl(inner1, this.manager())); - } - - public PagedIterable listDryrun(String resourceUri, Context context) { - PagedIterable inner = this.serviceClient().listDryrun(resourceUri, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DryrunResourceImpl(inner1, this.manager())); - } - - public Response getDryrunWithResponse(String resourceUri, String dryrunName, Context context) { - Response inner - = this.serviceClient().getDryrunWithResponse(resourceUri, dryrunName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DryrunResourceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DryrunResource getDryrun(String resourceUri, String dryrunName) { - DryrunResourceInner inner = this.serviceClient().getDryrun(resourceUri, dryrunName); - if (inner != null) { - return new DryrunResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public DryrunResource createDryrun(String resourceUri, String dryrunName, DryrunResourceInner parameters) { - DryrunResourceInner inner = this.serviceClient().createDryrun(resourceUri, dryrunName, parameters); - if (inner != null) { - return new DryrunResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public DryrunResource createDryrun(String resourceUri, String dryrunName, DryrunResourceInner parameters, - Context context) { - DryrunResourceInner inner = this.serviceClient().createDryrun(resourceUri, dryrunName, parameters, context); - if (inner != null) { - return new DryrunResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public DryrunResource updateDryrun(String resourceUri, String dryrunName, DryrunPatch parameters) { - DryrunResourceInner inner = this.serviceClient().updateDryrun(resourceUri, dryrunName, parameters); - if (inner != null) { - return new DryrunResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public DryrunResource updateDryrun(String resourceUri, String dryrunName, DryrunPatch parameters, Context context) { - DryrunResourceInner inner = this.serviceClient().updateDryrun(resourceUri, dryrunName, parameters, context); - if (inner != null) { - return new DryrunResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteDryrunWithResponse(String resourceUri, String dryrunName, Context context) { - return this.serviceClient().deleteDryrunWithResponse(resourceUri, dryrunName, context); - } - - public void deleteDryrun(String resourceUri, String dryrunName) { - this.serviceClient().deleteDryrun(resourceUri, dryrunName); - } - - public Response generateConfigurationsWithResponse(String resourceUri, String linkerName, - ConfigurationInfo parameters, Context context) { - Response inner - = this.serviceClient().generateConfigurationsWithResponse(resourceUri, linkerName, parameters, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ConfigurationResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ConfigurationResult generateConfigurations(String resourceUri, String linkerName) { - ConfigurationResultInner inner = this.serviceClient().generateConfigurations(resourceUri, linkerName); - if (inner != null) { - return new ConfigurationResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable listDaprConfigurations(String resourceUri) { - PagedIterable inner = this.serviceClient().listDaprConfigurations(resourceUri); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DaprConfigurationResourceImpl(inner1, this.manager())); - } - - public PagedIterable listDaprConfigurations(String resourceUri, Context context) { - PagedIterable inner - = this.serviceClient().listDaprConfigurations(resourceUri, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DaprConfigurationResourceImpl(inner1, this.manager())); - } - - private LinkersOperationsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ServiceLinkerManagementClientImpl.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ServiceLinkerManagementClientImpl.java index 516238282c4a7..d552571d23463 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ServiceLinkerManagementClientImpl.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ServiceLinkerManagementClientImpl.java @@ -23,10 +23,7 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.servicelinker.fluent.ConfigurationNamesOperationsClient; -import com.azure.resourcemanager.servicelinker.fluent.ConnectorsClient; import com.azure.resourcemanager.servicelinker.fluent.LinkersClient; -import com.azure.resourcemanager.servicelinker.fluent.LinkersOperationsClient; import com.azure.resourcemanager.servicelinker.fluent.OperationsClient; import com.azure.resourcemanager.servicelinker.fluent.ServiceLinkerManagementClient; import java.io.IOException; @@ -113,20 +110,6 @@ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } - /** - * The ConnectorsClient object to access its operations. - */ - private final ConnectorsClient connectors; - - /** - * Gets the ConnectorsClient object to access its operations. - * - * @return the ConnectorsClient object. - */ - public ConnectorsClient getConnectors() { - return this.connectors; - } - /** * The LinkersClient object to access its operations. */ @@ -141,20 +124,6 @@ public LinkersClient getLinkers() { return this.linkers; } - /** - * The LinkersOperationsClient object to access its operations. - */ - private final LinkersOperationsClient linkersOperations; - - /** - * Gets the LinkersOperationsClient object to access its operations. - * - * @return the LinkersOperationsClient object. - */ - public LinkersOperationsClient getLinkersOperations() { - return this.linkersOperations; - } - /** * The OperationsClient object to access its operations. */ @@ -169,20 +138,6 @@ public OperationsClient getOperations() { return this.operations; } - /** - * The ConfigurationNamesOperationsClient object to access its operations. - */ - private final ConfigurationNamesOperationsClient configurationNamesOperations; - - /** - * Gets the ConfigurationNamesOperationsClient object to access its operations. - * - * @return the ConfigurationNamesOperationsClient object. - */ - public ConfigurationNamesOperationsClient getConfigurationNamesOperations() { - return this.configurationNamesOperations; - } - /** * Initializes an instance of ServiceLinkerManagementClient client. * @@ -198,12 +153,9 @@ public ConfigurationNamesOperationsClient getConfigurationNamesOperations() { this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; this.endpoint = endpoint; - this.apiVersion = "2024-07-01-preview"; - this.connectors = new ConnectorsClientImpl(this); + this.apiVersion = "2022-05-01"; this.linkers = new LinkersClientImpl(this); - this.linkersOperations = new LinkersOperationsClientImpl(this); this.operations = new OperationsClientImpl(this); - this.configurationNamesOperations = new ConfigurationNamesOperationsClientImpl(this); } /** diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConfigurationResultImpl.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/SourceConfigurationResultImpl.java similarity index 70% rename from sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConfigurationResultImpl.java rename to sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/SourceConfigurationResultImpl.java index 7ed966817cd3c..b34d9322e7f51 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConfigurationResultImpl.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/SourceConfigurationResultImpl.java @@ -4,18 +4,18 @@ package com.azure.resourcemanager.servicelinker.implementation; -import com.azure.resourcemanager.servicelinker.fluent.models.ConfigurationResultInner; -import com.azure.resourcemanager.servicelinker.models.ConfigurationResult; +import com.azure.resourcemanager.servicelinker.fluent.models.SourceConfigurationResultInner; import com.azure.resourcemanager.servicelinker.models.SourceConfiguration; +import com.azure.resourcemanager.servicelinker.models.SourceConfigurationResult; import java.util.Collections; import java.util.List; -public final class ConfigurationResultImpl implements ConfigurationResult { - private ConfigurationResultInner innerObject; +public final class SourceConfigurationResultImpl implements SourceConfigurationResult { + private SourceConfigurationResultInner innerObject; private final com.azure.resourcemanager.servicelinker.ServiceLinkerManager serviceManager; - ConfigurationResultImpl(ConfigurationResultInner innerObject, + SourceConfigurationResultImpl(SourceConfigurationResultInner innerObject, com.azure.resourcemanager.servicelinker.ServiceLinkerManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -30,7 +30,7 @@ public List configurations() { } } - public ConfigurationResultInner innerModel() { + public SourceConfigurationResultInner innerModel() { return this.innerObject; } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AccessKeyInfoBase.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AccessKeyInfoBase.java deleted file mode 100644 index 93b6873ef03d7..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AccessKeyInfoBase.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The access key directly from target resource properties, which target service is Azure Resource, such as - * Microsoft.Storage. - */ -@Fluent -public final class AccessKeyInfoBase extends AuthInfoBase { - /* - * The authentication type. - */ - private AuthType authType = AuthType.ACCESS_KEY; - - /* - * Permissions of the accessKey. `Read` and `Write` are for Azure Cosmos DB and Azure App Configuration, `Listen`, - * `Send` and `Manage` are for Azure Event Hub and Azure Service Bus. - */ - private List permissions; - - /** - * Creates an instance of AccessKeyInfoBase class. - */ - public AccessKeyInfoBase() { - } - - /** - * Get the authType property: The authentication type. - * - * @return the authType value. - */ - @Override - public AuthType authType() { - return this.authType; - } - - /** - * Get the permissions property: Permissions of the accessKey. `Read` and `Write` are for Azure Cosmos DB and Azure - * App Configuration, `Listen`, `Send` and `Manage` are for Azure Event Hub and Azure Service Bus. - * - * @return the permissions value. - */ - public List permissions() { - return this.permissions; - } - - /** - * Set the permissions property: Permissions of the accessKey. `Read` and `Write` are for Azure Cosmos DB and Azure - * App Configuration, `Listen`, `Send` and `Manage` are for Azure Event Hub and Azure Service Bus. - * - * @param permissions the permissions value to set. - * @return the AccessKeyInfoBase object itself. - */ - public AccessKeyInfoBase withPermissions(List permissions) { - this.permissions = permissions; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AccessKeyInfoBase withAuthMode(AuthMode authMode) { - super.withAuthMode(authMode); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("authMode", authMode() == null ? null : authMode().toString()); - jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); - jsonWriter.writeArrayField("permissions", this.permissions, - (writer, element) -> writer.writeString(element == null ? null : element.toString())); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AccessKeyInfoBase from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AccessKeyInfoBase 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 AccessKeyInfoBase. - */ - public static AccessKeyInfoBase fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AccessKeyInfoBase deserializedAccessKeyInfoBase = new AccessKeyInfoBase(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("authMode".equals(fieldName)) { - deserializedAccessKeyInfoBase.withAuthMode(AuthMode.fromString(reader.getString())); - } else if ("authType".equals(fieldName)) { - deserializedAccessKeyInfoBase.authType = AuthType.fromString(reader.getString()); - } else if ("permissions".equals(fieldName)) { - List permissions - = reader.readArray(reader1 -> AccessKeyPermissions.fromString(reader1.getString())); - deserializedAccessKeyInfoBase.permissions = permissions; - } else { - reader.skipChildren(); - } - } - - return deserializedAccessKeyInfoBase; - }); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AccessKeyPermissions.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AccessKeyPermissions.java deleted file mode 100644 index 4154f53da0224..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AccessKeyPermissions.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for AccessKeyPermissions. - */ -public final class AccessKeyPermissions extends ExpandableStringEnum { - /** - * Static value Read for AccessKeyPermissions. - */ - public static final AccessKeyPermissions READ = fromString("Read"); - - /** - * Static value Write for AccessKeyPermissions. - */ - public static final AccessKeyPermissions WRITE = fromString("Write"); - - /** - * Static value Listen for AccessKeyPermissions. - */ - public static final AccessKeyPermissions LISTEN = fromString("Listen"); - - /** - * Static value Send for AccessKeyPermissions. - */ - public static final AccessKeyPermissions SEND = fromString("Send"); - - /** - * Static value Manage for AccessKeyPermissions. - */ - public static final AccessKeyPermissions MANAGE = fromString("Manage"); - - /** - * Creates a new instance of AccessKeyPermissions value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AccessKeyPermissions() { - } - - /** - * Creates or finds a AccessKeyPermissions from its string representation. - * - * @param name a name to look for. - * @return the corresponding AccessKeyPermissions. - */ - public static AccessKeyPermissions fromString(String name) { - return fromString(name, AccessKeyPermissions.class); - } - - /** - * Gets known AccessKeyPermissions values. - * - * @return known AccessKeyPermissions values. - */ - public static Collection values() { - return values(AccessKeyPermissions.class); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ActionType.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ActionType.java index 2fccf4cdfc3e0..a159899eefac1 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ActionType.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ActionType.java @@ -16,16 +16,6 @@ public final class ActionType extends ExpandableStringEnum { */ public static final ActionType INTERNAL = fromString("Internal"); - /** - * Static value enable for ActionType. - */ - public static final ActionType ENABLE = fromString("enable"); - - /** - * Static value optOut for ActionType. - */ - public static final ActionType OPT_OUT = fromString("optOut"); - /** * Creates a new instance of ActionType value. * diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AllowType.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AllowType.java deleted file mode 100644 index a0d0f08c5668a..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AllowType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Whether to allow firewall rules. - */ -public final class AllowType extends ExpandableStringEnum { - /** - * Static value true for AllowType. - */ - public static final AllowType TRUE = fromString("true"); - - /** - * Static value false for AllowType. - */ - public static final AllowType FALSE = fromString("false"); - - /** - * Creates a new instance of AllowType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AllowType() { - } - - /** - * Creates or finds a AllowType from its string representation. - * - * @param name a name to look for. - * @return the corresponding AllowType. - */ - public static AllowType fromString(String name) { - return fromString(name, AllowType.class); - } - - /** - * Gets known AllowType values. - * - * @return known AllowType values. - */ - public static Collection values() { - return values(AllowType.class); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AuthInfoBase.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AuthInfoBase.java index bf628c5b55c02..9787dd7d60539 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AuthInfoBase.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AuthInfoBase.java @@ -4,7 +4,7 @@ package com.azure.resourcemanager.servicelinker.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,20 +14,13 @@ /** * The authentication info. */ -@Fluent +@Immutable public class AuthInfoBase implements JsonSerializable { /* * The authentication type. */ private AuthType authType = AuthType.fromString("AuthInfoBase"); - /* - * Optional. Indicates how to configure authentication. If optInAllAuth, service linker configures authentication - * such as enabling identity on source resource and granting RBAC roles. If optOutAllAuth, opt out authentication - * setup. Default is optInAllAuth. - */ - private AuthMode authMode; - /** * Creates an instance of AuthInfoBase class. */ @@ -43,30 +36,6 @@ public AuthType authType() { return this.authType; } - /** - * Get the authMode property: Optional. Indicates how to configure authentication. If optInAllAuth, service linker - * configures authentication such as enabling identity on source resource and granting RBAC roles. If optOutAllAuth, - * opt out authentication setup. Default is optInAllAuth. - * - * @return the authMode value. - */ - public AuthMode authMode() { - return this.authMode; - } - - /** - * Set the authMode property: Optional. Indicates how to configure authentication. If optInAllAuth, service linker - * configures authentication such as enabling identity on source resource and granting RBAC roles. If optOutAllAuth, - * opt out authentication setup. Default is optInAllAuth. - * - * @param authMode the authMode value to set. - * @return the AuthInfoBase object itself. - */ - public AuthInfoBase withAuthMode(AuthMode authMode) { - this.authMode = authMode; - return this; - } - /** * Validates the instance. * @@ -82,7 +51,6 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); - jsonWriter.writeStringField("authMode", this.authMode == null ? null : this.authMode.toString()); return jsonWriter.writeEndObject(); } @@ -110,9 +78,7 @@ public static AuthInfoBase fromJson(JsonReader jsonReader) throws IOException { } } // Use the discriminator value to determine which subtype should be deserialized. - if ("accessKey".equals(discriminatorValue)) { - return AccessKeyInfoBase.fromJson(readerToUse.reset()); - } else if ("secret".equals(discriminatorValue)) { + if ("secret".equals(discriminatorValue)) { return SecretAuthInfo.fromJson(readerToUse.reset()); } else if ("userAssignedIdentity".equals(discriminatorValue)) { return UserAssignedIdentityAuthInfo.fromJson(readerToUse.reset()); @@ -122,10 +88,6 @@ public static AuthInfoBase fromJson(JsonReader jsonReader) throws IOException { return ServicePrincipalSecretAuthInfo.fromJson(readerToUse.reset()); } else if ("servicePrincipalCertificate".equals(discriminatorValue)) { return ServicePrincipalCertificateAuthInfo.fromJson(readerToUse.reset()); - } else if ("userAccount".equals(discriminatorValue)) { - return UserAccountAuthInfo.fromJson(readerToUse.reset()); - } else if ("easyAuthMicrosoftEntraID".equals(discriminatorValue)) { - return EasyAuthMicrosoftEntraIdAuthInfo.fromJson(readerToUse.reset()); } else { return fromJsonKnownDiscriminator(readerToUse.reset()); } @@ -142,8 +104,6 @@ static AuthInfoBase fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOE if ("authType".equals(fieldName)) { deserializedAuthInfoBase.authType = AuthType.fromString(reader.getString()); - } else if ("authMode".equals(fieldName)) { - deserializedAuthInfoBase.authMode = AuthMode.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AuthMode.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AuthMode.java deleted file mode 100644 index 6816500c38ad0..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AuthMode.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Indicates how to apply the authentication configuration operations. - */ -public final class AuthMode extends ExpandableStringEnum { - /** - * Static value optInAllAuth for AuthMode. - */ - public static final AuthMode OPT_IN_ALL_AUTH = fromString("optInAllAuth"); - - /** - * Static value optOutAllAuth for AuthMode. - */ - public static final AuthMode OPT_OUT_ALL_AUTH = fromString("optOutAllAuth"); - - /** - * Creates a new instance of AuthMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AuthMode() { - } - - /** - * Creates or finds a AuthMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding AuthMode. - */ - public static AuthMode fromString(String name) { - return fromString(name, AuthMode.class); - } - - /** - * Gets known AuthMode values. - * - * @return known AuthMode values. - */ - public static Collection values() { - return values(AuthMode.class); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AuthType.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AuthType.java index 1df2c3dca85d5..2f1334d4631d6 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AuthType.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AuthType.java @@ -36,21 +36,6 @@ public final class AuthType extends ExpandableStringEnum { */ public static final AuthType SECRET = fromString("secret"); - /** - * Static value accessKey for AuthType. - */ - public static final AuthType ACCESS_KEY = fromString("accessKey"); - - /** - * Static value userAccount for AuthType. - */ - public static final AuthType USER_ACCOUNT = fromString("userAccount"); - - /** - * Static value easyAuthMicrosoftEntraID for AuthType. - */ - public static final AuthType EASY_AUTH_MICROSOFT_ENTRA_ID = fromString("easyAuthMicrosoftEntraID"); - /** * Creates a new instance of AuthType value. * diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AzureAppConfigProperties.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AzureAppConfigProperties.java deleted file mode 100644 index 09ee887215fcc..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AzureAppConfigProperties.java +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The resource properties when type is Azure App Configuration. - */ -@Fluent -public final class AzureAppConfigProperties extends AzureResourcePropertiesBase { - /* - * The azure resource type. - */ - private AzureResourceType type = AzureResourceType.APP_CONFIG; - - /* - * True if connection enables app configuration kubernetes extension. - */ - private Boolean connectWithKubernetesExtension; - - /** - * Creates an instance of AzureAppConfigProperties class. - */ - public AzureAppConfigProperties() { - } - - /** - * Get the type property: The azure resource type. - * - * @return the type value. - */ - @Override - public AzureResourceType type() { - return this.type; - } - - /** - * Get the connectWithKubernetesExtension property: True if connection enables app configuration kubernetes - * extension. - * - * @return the connectWithKubernetesExtension value. - */ - public Boolean connectWithKubernetesExtension() { - return this.connectWithKubernetesExtension; - } - - /** - * Set the connectWithKubernetesExtension property: True if connection enables app configuration kubernetes - * extension. - * - * @param connectWithKubernetesExtension the connectWithKubernetesExtension value to set. - * @return the AzureAppConfigProperties object itself. - */ - public AzureAppConfigProperties withConnectWithKubernetesExtension(Boolean connectWithKubernetesExtension) { - this.connectWithKubernetesExtension = connectWithKubernetesExtension; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeBooleanField("connectWithKubernetesExtension", this.connectWithKubernetesExtension); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AzureAppConfigProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AzureAppConfigProperties 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 AzureAppConfigProperties. - */ - public static AzureAppConfigProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AzureAppConfigProperties deserializedAzureAppConfigProperties = new AzureAppConfigProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedAzureAppConfigProperties.type = AzureResourceType.fromString(reader.getString()); - } else if ("connectWithKubernetesExtension".equals(fieldName)) { - deserializedAzureAppConfigProperties.connectWithKubernetesExtension - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedAzureAppConfigProperties; - }); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AzureResourcePropertiesBase.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AzureResourcePropertiesBase.java index 9227189087a8e..c5377e4c35272 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AzureResourcePropertiesBase.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AzureResourcePropertiesBase.java @@ -80,8 +80,6 @@ public static AzureResourcePropertiesBase fromJson(JsonReader jsonReader) throws // Use the discriminator value to determine which subtype should be deserialized. if ("KeyVault".equals(discriminatorValue)) { return AzureKeyVaultProperties.fromJson(readerToUse.reset()); - } else if ("AppConfig".equals(discriminatorValue)) { - return AzureAppConfigProperties.fromJson(readerToUse.reset()); } else { return fromJsonKnownDiscriminator(readerToUse.reset()); } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AzureResourceType.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AzureResourceType.java index dfe95bfc2e959..40d7cf87a2a3e 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AzureResourceType.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AzureResourceType.java @@ -16,11 +16,6 @@ public final class AzureResourceType extends ExpandableStringEnum { - BasicErrorDryrunPrerequisiteResult deserializedBasicErrorDryrunPrerequisiteResult - = new BasicErrorDryrunPrerequisiteResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedBasicErrorDryrunPrerequisiteResult.type - = DryrunPrerequisiteResultType.fromString(reader.getString()); - } else if ("code".equals(fieldName)) { - deserializedBasicErrorDryrunPrerequisiteResult.code = reader.getString(); - } else if ("message".equals(fieldName)) { - deserializedBasicErrorDryrunPrerequisiteResult.message = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedBasicErrorDryrunPrerequisiteResult; - }); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ClientType.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ClientType.java index 25fe2f195653e..65274527d9e7f 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ClientType.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ClientType.java @@ -66,16 +66,6 @@ public final class ClientType extends ExpandableStringEnum { */ public static final ClientType KAFKA_SPRING_BOOT = fromString("kafka-springBoot"); - /** - * Static value jms-springBoot for ClientType. - */ - public static final ClientType JMS_SPRING_BOOT = fromString("jms-springBoot"); - - /** - * Static value dapr for ClientType. - */ - public static final ClientType DAPR = fromString("dapr"); - /** * Creates a new instance of ClientType value. * diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationInfo.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationInfo.java deleted file mode 100644 index d58e208cc20fc..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationInfo.java +++ /dev/null @@ -1,294 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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; -import java.util.Map; - -/** - * The configuration information, used to generate configurations or save to applications. - */ -@Fluent -public final class ConfigurationInfo implements JsonSerializable { - /* - * Indicates whether to clean up previous operation when Linker is updating or deleting - */ - private DeleteOrUpdateBehavior deleteOrUpdateBehavior; - - /* - * Optional, indicate whether to apply configurations on source application. If enable, generate configurations and - * applied to the source application. Default is enable. If optOut, no configuration change will be made on source. - */ - private ActionType action; - - /* - * Optional. A dictionary of default key name and customized key name mapping. If not specified, default key name - * will be used for generate configurations - */ - private Map customizedKeys; - - /* - * Indicates some additional properties for dapr client type - */ - private DaprProperties daprProperties; - - /* - * A dictionary of additional configurations to be added. Service will auto generate a set of basic configurations - * and this property is to full fill more customized configurations - */ - private Map additionalConfigurations; - - /* - * A dictionary of additional properties to be added in the end of connection string. - */ - private Map additionalConnectionStringProperties; - - /* - * An option to store configuration into different place - */ - private ConfigurationStore configurationStore; - - /** - * Creates an instance of ConfigurationInfo class. - */ - public ConfigurationInfo() { - } - - /** - * Get the deleteOrUpdateBehavior property: Indicates whether to clean up previous operation when Linker is updating - * or deleting. - * - * @return the deleteOrUpdateBehavior value. - */ - public DeleteOrUpdateBehavior deleteOrUpdateBehavior() { - return this.deleteOrUpdateBehavior; - } - - /** - * Set the deleteOrUpdateBehavior property: Indicates whether to clean up previous operation when Linker is updating - * or deleting. - * - * @param deleteOrUpdateBehavior the deleteOrUpdateBehavior value to set. - * @return the ConfigurationInfo object itself. - */ - public ConfigurationInfo withDeleteOrUpdateBehavior(DeleteOrUpdateBehavior deleteOrUpdateBehavior) { - this.deleteOrUpdateBehavior = deleteOrUpdateBehavior; - return this; - } - - /** - * Get the action property: Optional, indicate whether to apply configurations on source application. If enable, - * generate configurations and applied to the source application. Default is enable. If optOut, no configuration - * change will be made on source. - * - * @return the action value. - */ - public ActionType action() { - return this.action; - } - - /** - * Set the action property: Optional, indicate whether to apply configurations on source application. If enable, - * generate configurations and applied to the source application. Default is enable. If optOut, no configuration - * change will be made on source. - * - * @param action the action value to set. - * @return the ConfigurationInfo object itself. - */ - public ConfigurationInfo withAction(ActionType action) { - this.action = action; - return this; - } - - /** - * Get the customizedKeys property: Optional. A dictionary of default key name and customized key name mapping. If - * not specified, default key name will be used for generate configurations. - * - * @return the customizedKeys value. - */ - public Map customizedKeys() { - return this.customizedKeys; - } - - /** - * Set the customizedKeys property: Optional. A dictionary of default key name and customized key name mapping. If - * not specified, default key name will be used for generate configurations. - * - * @param customizedKeys the customizedKeys value to set. - * @return the ConfigurationInfo object itself. - */ - public ConfigurationInfo withCustomizedKeys(Map customizedKeys) { - this.customizedKeys = customizedKeys; - return this; - } - - /** - * Get the daprProperties property: Indicates some additional properties for dapr client type. - * - * @return the daprProperties value. - */ - public DaprProperties daprProperties() { - return this.daprProperties; - } - - /** - * Set the daprProperties property: Indicates some additional properties for dapr client type. - * - * @param daprProperties the daprProperties value to set. - * @return the ConfigurationInfo object itself. - */ - public ConfigurationInfo withDaprProperties(DaprProperties daprProperties) { - this.daprProperties = daprProperties; - return this; - } - - /** - * Get the additionalConfigurations property: A dictionary of additional configurations to be added. Service will - * auto generate a set of basic configurations and this property is to full fill more customized configurations. - * - * @return the additionalConfigurations value. - */ - public Map additionalConfigurations() { - return this.additionalConfigurations; - } - - /** - * Set the additionalConfigurations property: A dictionary of additional configurations to be added. Service will - * auto generate a set of basic configurations and this property is to full fill more customized configurations. - * - * @param additionalConfigurations the additionalConfigurations value to set. - * @return the ConfigurationInfo object itself. - */ - public ConfigurationInfo withAdditionalConfigurations(Map additionalConfigurations) { - this.additionalConfigurations = additionalConfigurations; - return this; - } - - /** - * Get the additionalConnectionStringProperties property: A dictionary of additional properties to be added in the - * end of connection string. - * - * @return the additionalConnectionStringProperties value. - */ - public Map additionalConnectionStringProperties() { - return this.additionalConnectionStringProperties; - } - - /** - * Set the additionalConnectionStringProperties property: A dictionary of additional properties to be added in the - * end of connection string. - * - * @param additionalConnectionStringProperties the additionalConnectionStringProperties value to set. - * @return the ConfigurationInfo object itself. - */ - public ConfigurationInfo - withAdditionalConnectionStringProperties(Map additionalConnectionStringProperties) { - this.additionalConnectionStringProperties = additionalConnectionStringProperties; - return this; - } - - /** - * Get the configurationStore property: An option to store configuration into different place. - * - * @return the configurationStore value. - */ - public ConfigurationStore configurationStore() { - return this.configurationStore; - } - - /** - * Set the configurationStore property: An option to store configuration into different place. - * - * @param configurationStore the configurationStore value to set. - * @return the ConfigurationInfo object itself. - */ - public ConfigurationInfo withConfigurationStore(ConfigurationStore configurationStore) { - this.configurationStore = configurationStore; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (daprProperties() != null) { - daprProperties().validate(); - } - if (configurationStore() != null) { - configurationStore().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("deleteOrUpdateBehavior", - this.deleteOrUpdateBehavior == null ? null : this.deleteOrUpdateBehavior.toString()); - jsonWriter.writeStringField("action", this.action == null ? null : this.action.toString()); - jsonWriter.writeMapField("customizedKeys", this.customizedKeys, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("daprProperties", this.daprProperties); - jsonWriter.writeMapField("additionalConfigurations", this.additionalConfigurations, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("additionalConnectionStringProperties", this.additionalConnectionStringProperties, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("configurationStore", this.configurationStore); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ConfigurationInfo from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ConfigurationInfo 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 ConfigurationInfo. - */ - public static ConfigurationInfo fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ConfigurationInfo deserializedConfigurationInfo = new ConfigurationInfo(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("deleteOrUpdateBehavior".equals(fieldName)) { - deserializedConfigurationInfo.deleteOrUpdateBehavior - = DeleteOrUpdateBehavior.fromString(reader.getString()); - } else if ("action".equals(fieldName)) { - deserializedConfigurationInfo.action = ActionType.fromString(reader.getString()); - } else if ("customizedKeys".equals(fieldName)) { - Map customizedKeys = reader.readMap(reader1 -> reader1.getString()); - deserializedConfigurationInfo.customizedKeys = customizedKeys; - } else if ("daprProperties".equals(fieldName)) { - deserializedConfigurationInfo.daprProperties = DaprProperties.fromJson(reader); - } else if ("additionalConfigurations".equals(fieldName)) { - Map additionalConfigurations = reader.readMap(reader1 -> reader1.getString()); - deserializedConfigurationInfo.additionalConfigurations = additionalConfigurations; - } else if ("additionalConnectionStringProperties".equals(fieldName)) { - Map additionalConnectionStringProperties - = reader.readMap(reader1 -> reader1.getString()); - deserializedConfigurationInfo.additionalConnectionStringProperties - = additionalConnectionStringProperties; - } else if ("configurationStore".equals(fieldName)) { - deserializedConfigurationInfo.configurationStore = ConfigurationStore.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedConfigurationInfo; - }); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationName.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationName.java deleted file mode 100644 index f29ffe90c0c54..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationName.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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 configuration names. - */ -@Fluent -public final class ConfigurationName implements JsonSerializable { - /* - * The value property. - */ - private String value; - - /* - * Description for the configuration name. - */ - private String description; - - /* - * Represent the configuration is required or not - */ - private Boolean required; - - /** - * Creates an instance of ConfigurationName class. - */ - public ConfigurationName() { - } - - /** - * Get the value property: The value property. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: The value property. - * - * @param value the value value to set. - * @return the ConfigurationName object itself. - */ - public ConfigurationName withValue(String value) { - this.value = value; - return this; - } - - /** - * Get the description property: Description for the configuration name. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Description for the configuration name. - * - * @param description the description value to set. - * @return the ConfigurationName object itself. - */ - public ConfigurationName withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the required property: Represent the configuration is required or not. - * - * @return the required value. - */ - public Boolean required() { - return this.required; - } - - /** - * Set the required property: Represent the configuration is required or not. - * - * @param required the required value to set. - * @return the ConfigurationName object itself. - */ - public ConfigurationName withRequired(Boolean required) { - this.required = required; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("value", this.value); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeBooleanField("required", this.required); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ConfigurationName from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ConfigurationName 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 ConfigurationName. - */ - public static ConfigurationName fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ConfigurationName deserializedConfigurationName = new ConfigurationName(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - deserializedConfigurationName.value = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedConfigurationName.description = reader.getString(); - } else if ("required".equals(fieldName)) { - deserializedConfigurationName.required = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedConfigurationName; - }); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationNameItem.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationNameItem.java deleted file mode 100644 index 6267c47394649..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationNameItem.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.models; - -import com.azure.resourcemanager.servicelinker.fluent.models.ConfigurationNameItemInner; -import java.util.List; - -/** - * An immutable client-side representation of ConfigurationNameItem. - */ -public interface ConfigurationNameItem { - /** - * Gets the targetService property: The target service provider name and resource name. - * - * @return the targetService value. - */ - String targetService(); - - /** - * Gets the clientType property: The client type for configuration names. - * - * @return the clientType value. - */ - ClientType clientType(); - - /** - * Gets the authType property: The auth type. - * - * @return the authType value. - */ - AuthType authType(); - - /** - * Gets the secretType property: Indicates where the secrets in configuration from. Used when secrets are from - * Keyvault. - * - * @return the secretType value. - */ - SecretSourceType secretType(); - - /** - * Gets the daprProperties property: Deprecated, please use #/definitions/DaprConfigurationList instead. - * - * @return the daprProperties value. - */ - DaprProperties daprProperties(); - - /** - * Gets the names property: The configuration names to be set in compute service environment. - * - * @return the names value. - */ - List names(); - - /** - * Gets the inner com.azure.resourcemanager.servicelinker.fluent.models.ConfigurationNameItemInner object. - * - * @return the inner object. - */ - ConfigurationNameItemInner innerModel(); -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationNameResult.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationNameResult.java deleted file mode 100644 index 43e90c1394449..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationNameResult.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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.servicelinker.fluent.models.ConfigurationNameItemInner; -import java.io.IOException; -import java.util.List; - -/** - * Configuration Name list which will be set based on different target resource, client type, auth type. - */ -@Fluent -public final class ConfigurationNameResult implements JsonSerializable { - /* - * Expected configuration names for each target service. - */ - private List value; - - /* - * Link to next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of ConfigurationNameResult class. - */ - public ConfigurationNameResult() { - } - - /** - * Get the value property: Expected configuration names for each target service. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Expected configuration names for each target service. - * - * @param value the value value to set. - * @return the ConfigurationNameResult object itself. - */ - public ConfigurationNameResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link to next page of resources. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * 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.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ConfigurationNameResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ConfigurationNameResult 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 ConfigurationNameResult. - */ - public static ConfigurationNameResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ConfigurationNameResult deserializedConfigurationNameResult = new ConfigurationNameResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ConfigurationNameItemInner.fromJson(reader1)); - deserializedConfigurationNameResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedConfigurationNameResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedConfigurationNameResult; - }); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationNamesOperations.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationNamesOperations.java deleted file mode 100644 index 2e524b4c0f897..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationNamesOperations.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** - * Resource collection API of ConfigurationNamesOperations. - */ -public interface ConfigurationNamesOperations { - /** - * Lists the configuration names generated by Service Connector for all target, client types, auth types. - * - * @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 configuration Name list which will be set based on different target resource, client type, auth type as - * paginated response with {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * Lists the configuration names generated by Service Connector for all target, client types, auth types. - * - * @param filter OData filter options. - * @param skipToken OData skipToken option for pagination. - * @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 configuration Name list which will be set based on different target resource, client type, auth type as - * paginated response with {@link PagedIterable}. - */ - PagedIterable list(String filter, String skipToken, Context context); -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationStore.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationStore.java deleted file mode 100644 index d9dcd499aec6e..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationStore.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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; - -/** - * An option to store configuration into different place. - */ -@Fluent -public final class ConfigurationStore implements JsonSerializable { - /* - * The app configuration id to store configuration - */ - private String appConfigurationId; - - /** - * Creates an instance of ConfigurationStore class. - */ - public ConfigurationStore() { - } - - /** - * Get the appConfigurationId property: The app configuration id to store configuration. - * - * @return the appConfigurationId value. - */ - public String appConfigurationId() { - return this.appConfigurationId; - } - - /** - * Set the appConfigurationId property: The app configuration id to store configuration. - * - * @param appConfigurationId the appConfigurationId value to set. - * @return the ConfigurationStore object itself. - */ - public ConfigurationStore withAppConfigurationId(String appConfigurationId) { - this.appConfigurationId = appConfigurationId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("appConfigurationId", this.appConfigurationId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ConfigurationStore from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ConfigurationStore 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 ConfigurationStore. - */ - public static ConfigurationStore fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ConfigurationStore deserializedConfigurationStore = new ConfigurationStore(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("appConfigurationId".equals(fieldName)) { - deserializedConfigurationStore.appConfigurationId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedConfigurationStore; - }); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/Connectors.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/Connectors.java deleted file mode 100644 index d9368e0157f20..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/Connectors.java +++ /dev/null @@ -1,373 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.servicelinker.fluent.models.LinkerResourceInner; - -/** - * Resource collection API of Connectors. - */ -public interface Connectors { - /** - * list dryrun jobs. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @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 dryrun as paginated response with {@link PagedIterable}. - */ - PagedIterable listDryrun(String subscriptionId, String resourceGroupName, String location); - - /** - * list dryrun jobs. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @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 dryrun as paginated response with {@link PagedIterable}. - */ - PagedIterable listDryrun(String subscriptionId, String resourceGroupName, String location, - Context context); - - /** - * get a dryrun job. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @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 dryrun job along with {@link Response}. - */ - Response getDryrunWithResponse(String subscriptionId, String resourceGroupName, String location, - String dryrunName, Context context); - - /** - * get a dryrun job. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @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 dryrun job. - */ - DryrunResource getDryrun(String subscriptionId, String resourceGroupName, String location, String dryrunName); - - /** - * delete a dryrun job. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @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 deleteDryrunWithResponse(String subscriptionId, String resourceGroupName, String location, - String dryrunName, Context context); - - /** - * delete a dryrun job. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param dryrunName The name of dryrun. - * @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 deleteDryrun(String subscriptionId, String resourceGroupName, String location, String dryrunName); - - /** - * Returns list of connector which connects to the resource, which supports to config the target service during the - * resource provision. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @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 Linker as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String subscriptionId, String resourceGroupName, String location); - - /** - * Returns list of connector which connects to the resource, which supports to config the target service during the - * resource provision. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @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 Linker as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String subscriptionId, String resourceGroupName, String location, - Context context); - - /** - * Returns Connector resource for a given name. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 linker of source and target resource along with {@link Response}. - */ - Response getWithResponse(String subscriptionId, String resourceGroupName, String location, - String connectorName, Context context); - - /** - * Returns Connector resource for a given name. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 linker of source and target resource. - */ - LinkerResource get(String subscriptionId, String resourceGroupName, String location, String connectorName); - - /** - * Create or update Connector resource. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connector details. - * @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 linker of source and target resource. - */ - LinkerResource createOrUpdate(String subscriptionId, String resourceGroupName, String location, - String connectorName, LinkerResourceInner parameters); - - /** - * Create or update Connector resource. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connector details. - * @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 linker of source and target resource. - */ - LinkerResource createOrUpdate(String subscriptionId, String resourceGroupName, String location, - String connectorName, LinkerResourceInner parameters, Context context); - - /** - * Delete a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 subscriptionId, String resourceGroupName, String location, String connectorName); - - /** - * Delete a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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. - */ - void delete(String subscriptionId, String resourceGroupName, String location, String connectorName, - Context context); - - /** - * Operation to update an existing Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connector details. - * @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 linker of source and target resource. - */ - LinkerResource update(String subscriptionId, String resourceGroupName, String location, String connectorName, - LinkerPatch parameters); - - /** - * Operation to update an existing Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connector details. - * @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 linker of source and target resource. - */ - LinkerResource update(String subscriptionId, String resourceGroupName, String location, String connectorName, - LinkerPatch parameters, Context context); - - /** - * Validate a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 validation operation result for a Linker. - */ - ValidateOperationResult validate(String subscriptionId, String resourceGroupName, String location, - String connectorName); - - /** - * Validate a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 validation operation result for a Linker. - */ - ValidateOperationResult validate(String subscriptionId, String resourceGroupName, String location, - String connectorName, Context context); - - /** - * Generate configurations for a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of resource. - * @param parameters Connection Info, including format, secret store, etc. - * @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 configurations for source resource, include appSettings, connectionString and serviceBindings along with - * {@link Response}. - */ - Response generateConfigurationsWithResponse(String subscriptionId, String resourceGroupName, - String location, String connectorName, ConfigurationInfo parameters, Context context); - - /** - * Generate configurations for a Connector. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @param connectorName The name of 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 configurations for source resource, include appSettings, connectionString and serviceBindings. - */ - ConfigurationResult generateConfigurations(String subscriptionId, String resourceGroupName, String location, - String connectorName); - - /** - * get a dryrun job. - * - * @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 a dryrun job along with {@link Response}. - */ - DryrunResource getDryrunById(String id); - - /** - * get a dryrun job. - * - * @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 a dryrun job along with {@link Response}. - */ - Response getDryrunByIdWithResponse(String id, Context context); - - /** - * delete a dryrun job. - * - * @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 deleteDryrunById(String id); - - /** - * delete a dryrun job. - * - * @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 deleteDryrunByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new DryrunResource resource. - * - * @param name resource name. - * @return the first stage of the new DryrunResource definition. - */ - DryrunResource.DefinitionStages.Blank define(String name); -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/CreateOrUpdateDryrunParameters.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/CreateOrUpdateDryrunParameters.java deleted file mode 100644 index ed4d320beed94..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/CreateOrUpdateDryrunParameters.java +++ /dev/null @@ -1,346 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The dryrun parameters for creation or update a linker. - */ -@Fluent -public final class CreateOrUpdateDryrunParameters extends DryrunParameters { - /* - * The name of action for you dryrun job. - */ - private DryrunActionName actionName = DryrunActionName.CREATE_OR_UPDATE; - - /* - * The target service properties - */ - private TargetServiceBase targetService; - - /* - * The authentication type. - */ - private AuthInfoBase authInfo; - - /* - * The application client type - */ - private ClientType clientType; - - /* - * The provisioning state. - */ - private String provisioningState; - - /* - * The VNet solution. - */ - private VNetSolution vNetSolution; - - /* - * An option to store secret value in secure place - */ - private SecretStore secretStore; - - /* - * connection scope in source service. - */ - private String scope; - - /* - * The network solution. - */ - private PublicNetworkSolution publicNetworkSolution; - - /* - * The connection information consumed by applications, including secrets, connection strings. - */ - private ConfigurationInfo configurationInfo; - - /** - * Creates an instance of CreateOrUpdateDryrunParameters class. - */ - public CreateOrUpdateDryrunParameters() { - } - - /** - * Get the actionName property: The name of action for you dryrun job. - * - * @return the actionName value. - */ - @Override - public DryrunActionName actionName() { - return this.actionName; - } - - /** - * Get the targetService property: The target service properties. - * - * @return the targetService value. - */ - public TargetServiceBase targetService() { - return this.targetService; - } - - /** - * Set the targetService property: The target service properties. - * - * @param targetService the targetService value to set. - * @return the CreateOrUpdateDryrunParameters object itself. - */ - public CreateOrUpdateDryrunParameters withTargetService(TargetServiceBase targetService) { - this.targetService = targetService; - return this; - } - - /** - * Get the authInfo property: The authentication type. - * - * @return the authInfo value. - */ - public AuthInfoBase authInfo() { - return this.authInfo; - } - - /** - * Set the authInfo property: The authentication type. - * - * @param authInfo the authInfo value to set. - * @return the CreateOrUpdateDryrunParameters object itself. - */ - public CreateOrUpdateDryrunParameters withAuthInfo(AuthInfoBase authInfo) { - this.authInfo = authInfo; - return this; - } - - /** - * Get the clientType property: The application client type. - * - * @return the clientType value. - */ - public ClientType clientType() { - return this.clientType; - } - - /** - * Set the clientType property: The application client type. - * - * @param clientType the clientType value to set. - * @return the CreateOrUpdateDryrunParameters object itself. - */ - public CreateOrUpdateDryrunParameters withClientType(ClientType clientType) { - this.clientType = clientType; - return this; - } - - /** - * Get the provisioningState property: The provisioning state. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Get the vNetSolution property: The VNet solution. - * - * @return the vNetSolution value. - */ - public VNetSolution vNetSolution() { - return this.vNetSolution; - } - - /** - * Set the vNetSolution property: The VNet solution. - * - * @param vNetSolution the vNetSolution value to set. - * @return the CreateOrUpdateDryrunParameters object itself. - */ - public CreateOrUpdateDryrunParameters withVNetSolution(VNetSolution vNetSolution) { - this.vNetSolution = vNetSolution; - return this; - } - - /** - * Get the secretStore property: An option to store secret value in secure place. - * - * @return the secretStore value. - */ - public SecretStore secretStore() { - return this.secretStore; - } - - /** - * Set the secretStore property: An option to store secret value in secure place. - * - * @param secretStore the secretStore value to set. - * @return the CreateOrUpdateDryrunParameters object itself. - */ - public CreateOrUpdateDryrunParameters withSecretStore(SecretStore secretStore) { - this.secretStore = secretStore; - return this; - } - - /** - * Get the scope property: connection scope in source service. - * - * @return the scope value. - */ - public String scope() { - return this.scope; - } - - /** - * Set the scope property: connection scope in source service. - * - * @param scope the scope value to set. - * @return the CreateOrUpdateDryrunParameters object itself. - */ - public CreateOrUpdateDryrunParameters withScope(String scope) { - this.scope = scope; - return this; - } - - /** - * Get the publicNetworkSolution property: The network solution. - * - * @return the publicNetworkSolution value. - */ - public PublicNetworkSolution publicNetworkSolution() { - return this.publicNetworkSolution; - } - - /** - * Set the publicNetworkSolution property: The network solution. - * - * @param publicNetworkSolution the publicNetworkSolution value to set. - * @return the CreateOrUpdateDryrunParameters object itself. - */ - public CreateOrUpdateDryrunParameters withPublicNetworkSolution(PublicNetworkSolution publicNetworkSolution) { - this.publicNetworkSolution = publicNetworkSolution; - return this; - } - - /** - * Get the configurationInfo property: The connection information consumed by applications, including secrets, - * connection strings. - * - * @return the configurationInfo value. - */ - public ConfigurationInfo configurationInfo() { - return this.configurationInfo; - } - - /** - * Set the configurationInfo property: The connection information consumed by applications, including secrets, - * connection strings. - * - * @param configurationInfo the configurationInfo value to set. - * @return the CreateOrUpdateDryrunParameters object itself. - */ - public CreateOrUpdateDryrunParameters withConfigurationInfo(ConfigurationInfo configurationInfo) { - this.configurationInfo = configurationInfo; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (targetService() != null) { - targetService().validate(); - } - if (authInfo() != null) { - authInfo().validate(); - } - if (vNetSolution() != null) { - vNetSolution().validate(); - } - if (secretStore() != null) { - secretStore().validate(); - } - if (publicNetworkSolution() != null) { - publicNetworkSolution().validate(); - } - if (configurationInfo() != null) { - configurationInfo().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("actionName", this.actionName == null ? null : this.actionName.toString()); - jsonWriter.writeJsonField("targetService", this.targetService); - jsonWriter.writeJsonField("authInfo", this.authInfo); - jsonWriter.writeStringField("clientType", this.clientType == null ? null : this.clientType.toString()); - jsonWriter.writeJsonField("vNetSolution", this.vNetSolution); - jsonWriter.writeJsonField("secretStore", this.secretStore); - jsonWriter.writeStringField("scope", this.scope); - jsonWriter.writeJsonField("publicNetworkSolution", this.publicNetworkSolution); - jsonWriter.writeJsonField("configurationInfo", this.configurationInfo); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CreateOrUpdateDryrunParameters from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CreateOrUpdateDryrunParameters 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 CreateOrUpdateDryrunParameters. - */ - public static CreateOrUpdateDryrunParameters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CreateOrUpdateDryrunParameters deserializedCreateOrUpdateDryrunParameters - = new CreateOrUpdateDryrunParameters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("actionName".equals(fieldName)) { - deserializedCreateOrUpdateDryrunParameters.actionName - = DryrunActionName.fromString(reader.getString()); - } else if ("targetService".equals(fieldName)) { - deserializedCreateOrUpdateDryrunParameters.targetService = TargetServiceBase.fromJson(reader); - } else if ("authInfo".equals(fieldName)) { - deserializedCreateOrUpdateDryrunParameters.authInfo = AuthInfoBase.fromJson(reader); - } else if ("clientType".equals(fieldName)) { - deserializedCreateOrUpdateDryrunParameters.clientType = ClientType.fromString(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedCreateOrUpdateDryrunParameters.provisioningState = reader.getString(); - } else if ("vNetSolution".equals(fieldName)) { - deserializedCreateOrUpdateDryrunParameters.vNetSolution = VNetSolution.fromJson(reader); - } else if ("secretStore".equals(fieldName)) { - deserializedCreateOrUpdateDryrunParameters.secretStore = SecretStore.fromJson(reader); - } else if ("scope".equals(fieldName)) { - deserializedCreateOrUpdateDryrunParameters.scope = reader.getString(); - } else if ("publicNetworkSolution".equals(fieldName)) { - deserializedCreateOrUpdateDryrunParameters.publicNetworkSolution - = PublicNetworkSolution.fromJson(reader); - } else if ("configurationInfo".equals(fieldName)) { - deserializedCreateOrUpdateDryrunParameters.configurationInfo = ConfigurationInfo.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedCreateOrUpdateDryrunParameters; - }); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DaprBindingComponentDirection.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DaprBindingComponentDirection.java deleted file mode 100644 index 44a2405aa378d..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DaprBindingComponentDirection.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The direction supported by the dapr binding component. - */ -public final class DaprBindingComponentDirection extends ExpandableStringEnum { - /** - * Static value input for DaprBindingComponentDirection. - */ - public static final DaprBindingComponentDirection INPUT = fromString("input"); - - /** - * Static value output for DaprBindingComponentDirection. - */ - public static final DaprBindingComponentDirection OUTPUT = fromString("output"); - - /** - * Creates a new instance of DaprBindingComponentDirection value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DaprBindingComponentDirection() { - } - - /** - * Creates or finds a DaprBindingComponentDirection from its string representation. - * - * @param name a name to look for. - * @return the corresponding DaprBindingComponentDirection. - */ - public static DaprBindingComponentDirection fromString(String name) { - return fromString(name, DaprBindingComponentDirection.class); - } - - /** - * Gets known DaprBindingComponentDirection values. - * - * @return known DaprBindingComponentDirection values. - */ - public static Collection values() { - return values(DaprBindingComponentDirection.class); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DaprConfigurationList.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DaprConfigurationList.java deleted file mode 100644 index 21ffe893b94eb..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DaprConfigurationList.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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.servicelinker.fluent.models.DaprConfigurationResourceInner; -import java.io.IOException; -import java.util.List; - -/** - * Dapr configuration list supported by Service Connector. - */ -@Fluent -public final class DaprConfigurationList implements JsonSerializable { - /* - * The list of dapr configurations - */ - private List value; - - /* - * Link to next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of DaprConfigurationList class. - */ - public DaprConfigurationList() { - } - - /** - * Get the value property: The list of dapr configurations. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of dapr configurations. - * - * @param value the value value to set. - * @return the DaprConfigurationList object itself. - */ - public DaprConfigurationList withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: Link to next page of resources. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * 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.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprConfigurationList from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprConfigurationList 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 DaprConfigurationList. - */ - public static DaprConfigurationList fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprConfigurationList deserializedDaprConfigurationList = new DaprConfigurationList(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> DaprConfigurationResourceInner.fromJson(reader1)); - deserializedDaprConfigurationList.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedDaprConfigurationList.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprConfigurationList; - }); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DaprConfigurationResource.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DaprConfigurationResource.java deleted file mode 100644 index aead83cbd7403..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DaprConfigurationResource.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.models; - -import com.azure.resourcemanager.servicelinker.fluent.models.DaprConfigurationResourceInner; - -/** - * An immutable client-side representation of DaprConfigurationResource. - */ -public interface DaprConfigurationResource { - /** - * Gets the targetType property: Supported target resource type, extract from resource id, uppercase. - * - * @return the targetType value. - */ - String targetType(); - - /** - * Gets the authType property: The authentication type. - * - * @return the authType value. - */ - AuthType authType(); - - /** - * Gets the daprProperties property: Indicates some additional properties for dapr client type. - * - * @return the daprProperties value. - */ - DaprProperties daprProperties(); - - /** - * Gets the inner com.azure.resourcemanager.servicelinker.fluent.models.DaprConfigurationResourceInner object. - * - * @return the inner object. - */ - DaprConfigurationResourceInner innerModel(); -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DaprMetadata.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DaprMetadata.java deleted file mode 100644 index 5bd6fe768f00d..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DaprMetadata.java +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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 dapr component metadata. - */ -@Fluent -public final class DaprMetadata implements JsonSerializable { - /* - * Metadata property name. - */ - private String name; - - /* - * Metadata property value. - */ - private String value; - - /* - * The secret name where dapr could get value - */ - private String secretRef; - - /* - * The description of the metadata, returned from configuration api - */ - private String description; - - /* - * The value indicating whether the metadata is required or not - */ - private DaprMetadataRequired required; - - /** - * Creates an instance of DaprMetadata class. - */ - public DaprMetadata() { - } - - /** - * Get the name property: Metadata property name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Metadata property name. - * - * @param name the name value to set. - * @return the DaprMetadata object itself. - */ - public DaprMetadata withName(String name) { - this.name = name; - return this; - } - - /** - * Get the value property: Metadata property value. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: Metadata property value. - * - * @param value the value value to set. - * @return the DaprMetadata object itself. - */ - public DaprMetadata withValue(String value) { - this.value = value; - return this; - } - - /** - * Get the secretRef property: The secret name where dapr could get value. - * - * @return the secretRef value. - */ - public String secretRef() { - return this.secretRef; - } - - /** - * Set the secretRef property: The secret name where dapr could get value. - * - * @param secretRef the secretRef value to set. - * @return the DaprMetadata object itself. - */ - public DaprMetadata withSecretRef(String secretRef) { - this.secretRef = secretRef; - return this; - } - - /** - * Get the description property: The description of the metadata, returned from configuration api. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The description of the metadata, returned from configuration api. - * - * @param description the description value to set. - * @return the DaprMetadata object itself. - */ - public DaprMetadata withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the required property: The value indicating whether the metadata is required or not. - * - * @return the required value. - */ - public DaprMetadataRequired required() { - return this.required; - } - - /** - * Set the required property: The value indicating whether the metadata is required or not. - * - * @param required the required value to set. - * @return the DaprMetadata object itself. - */ - public DaprMetadata withRequired(DaprMetadataRequired required) { - this.required = required; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("value", this.value); - jsonWriter.writeStringField("secretRef", this.secretRef); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeStringField("required", this.required == null ? null : this.required.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprMetadata from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprMetadata 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 DaprMetadata. - */ - public static DaprMetadata fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprMetadata deserializedDaprMetadata = new DaprMetadata(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedDaprMetadata.name = reader.getString(); - } else if ("value".equals(fieldName)) { - deserializedDaprMetadata.value = reader.getString(); - } else if ("secretRef".equals(fieldName)) { - deserializedDaprMetadata.secretRef = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedDaprMetadata.description = reader.getString(); - } else if ("required".equals(fieldName)) { - deserializedDaprMetadata.required = DaprMetadataRequired.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprMetadata; - }); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DaprMetadataRequired.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DaprMetadataRequired.java deleted file mode 100644 index 19c304f95e961..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DaprMetadataRequired.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The value indicating whether the metadata is required or not. - */ -public final class DaprMetadataRequired extends ExpandableStringEnum { - /** - * Static value true for DaprMetadataRequired. - */ - public static final DaprMetadataRequired TRUE = fromString("true"); - - /** - * Static value false for DaprMetadataRequired. - */ - public static final DaprMetadataRequired FALSE = fromString("false"); - - /** - * Creates a new instance of DaprMetadataRequired value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DaprMetadataRequired() { - } - - /** - * Creates or finds a DaprMetadataRequired from its string representation. - * - * @param name a name to look for. - * @return the corresponding DaprMetadataRequired. - */ - public static DaprMetadataRequired fromString(String name) { - return fromString(name, DaprMetadataRequired.class); - } - - /** - * Gets known DaprMetadataRequired values. - * - * @return known DaprMetadataRequired values. - */ - public static Collection values() { - return values(DaprMetadataRequired.class); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DaprProperties.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DaprProperties.java deleted file mode 100644 index 11eec81558337..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DaprProperties.java +++ /dev/null @@ -1,244 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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; -import java.util.List; - -/** - * Indicates some additional properties for dapr client type. - */ -@Fluent -public final class DaprProperties implements JsonSerializable { - /* - * The dapr component version - */ - private String version; - - /* - * The dapr component type - */ - private String componentType; - - /* - * The name of a secret store dapr to retrieve secret - */ - private String secretStoreComponent; - - /* - * Additional dapr metadata - */ - private List metadata; - - /* - * The dapr component scopes - */ - private List scopes; - - /* - * The runtime version supported by the properties - */ - private String runtimeVersion; - - /* - * The direction supported by the dapr binding component - */ - private DaprBindingComponentDirection bindingComponentDirection; - - /** - * Creates an instance of DaprProperties class. - */ - public DaprProperties() { - } - - /** - * Get the version property: The dapr component version. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: The dapr component version. - * - * @param version the version value to set. - * @return the DaprProperties object itself. - */ - public DaprProperties withVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the componentType property: The dapr component type. - * - * @return the componentType value. - */ - public String componentType() { - return this.componentType; - } - - /** - * Set the componentType property: The dapr component type. - * - * @param componentType the componentType value to set. - * @return the DaprProperties object itself. - */ - public DaprProperties withComponentType(String componentType) { - this.componentType = componentType; - return this; - } - - /** - * Get the secretStoreComponent property: The name of a secret store dapr to retrieve secret. - * - * @return the secretStoreComponent value. - */ - public String secretStoreComponent() { - return this.secretStoreComponent; - } - - /** - * Set the secretStoreComponent property: The name of a secret store dapr to retrieve secret. - * - * @param secretStoreComponent the secretStoreComponent value to set. - * @return the DaprProperties object itself. - */ - public DaprProperties withSecretStoreComponent(String secretStoreComponent) { - this.secretStoreComponent = secretStoreComponent; - return this; - } - - /** - * Get the metadata property: Additional dapr metadata. - * - * @return the metadata value. - */ - public List metadata() { - return this.metadata; - } - - /** - * Set the metadata property: Additional dapr metadata. - * - * @param metadata the metadata value to set. - * @return the DaprProperties object itself. - */ - public DaprProperties withMetadata(List metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get the scopes property: The dapr component scopes. - * - * @return the scopes value. - */ - public List scopes() { - return this.scopes; - } - - /** - * Set the scopes property: The dapr component scopes. - * - * @param scopes the scopes value to set. - * @return the DaprProperties object itself. - */ - public DaprProperties withScopes(List scopes) { - this.scopes = scopes; - return this; - } - - /** - * Get the runtimeVersion property: The runtime version supported by the properties. - * - * @return the runtimeVersion value. - */ - public String runtimeVersion() { - return this.runtimeVersion; - } - - /** - * Get the bindingComponentDirection property: The direction supported by the dapr binding component. - * - * @return the bindingComponentDirection value. - */ - public DaprBindingComponentDirection bindingComponentDirection() { - return this.bindingComponentDirection; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (metadata() != null) { - metadata().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("version", this.version); - jsonWriter.writeStringField("componentType", this.componentType); - jsonWriter.writeStringField("secretStoreComponent", this.secretStoreComponent); - jsonWriter.writeArrayField("metadata", this.metadata, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("scopes", this.scopes, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprProperties 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 DaprProperties. - */ - public static DaprProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprProperties deserializedDaprProperties = new DaprProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("version".equals(fieldName)) { - deserializedDaprProperties.version = reader.getString(); - } else if ("componentType".equals(fieldName)) { - deserializedDaprProperties.componentType = reader.getString(); - } else if ("secretStoreComponent".equals(fieldName)) { - deserializedDaprProperties.secretStoreComponent = reader.getString(); - } else if ("metadata".equals(fieldName)) { - List metadata = reader.readArray(reader1 -> DaprMetadata.fromJson(reader1)); - deserializedDaprProperties.metadata = metadata; - } else if ("scopes".equals(fieldName)) { - List scopes = reader.readArray(reader1 -> reader1.getString()); - deserializedDaprProperties.scopes = scopes; - } else if ("runtimeVersion".equals(fieldName)) { - deserializedDaprProperties.runtimeVersion = reader.getString(); - } else if ("bindingComponentDirection".equals(fieldName)) { - deserializedDaprProperties.bindingComponentDirection - = DaprBindingComponentDirection.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprProperties; - }); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DatabaseAadAuthInfo.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DatabaseAadAuthInfo.java deleted file mode 100644 index 5483cc164f69e..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DatabaseAadAuthInfo.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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 extra auth info required by Database AAD authentication. - */ -@Fluent -public class DatabaseAadAuthInfo implements JsonSerializable { - /* - * Username created in the database which is mapped to a user in AAD. - */ - private String username; - - /** - * Creates an instance of DatabaseAadAuthInfo class. - */ - public DatabaseAadAuthInfo() { - } - - /** - * Get the username property: Username created in the database which is mapped to a user in AAD. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: Username created in the database which is mapped to a user in AAD. - * - * @param username the username value to set. - * @return the DatabaseAadAuthInfo object itself. - */ - public DatabaseAadAuthInfo withUsername(String username) { - this.username = username; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("userName", this.username); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DatabaseAadAuthInfo from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DatabaseAadAuthInfo 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 DatabaseAadAuthInfo. - */ - public static DatabaseAadAuthInfo fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DatabaseAadAuthInfo deserializedDatabaseAadAuthInfo = new DatabaseAadAuthInfo(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("userName".equals(fieldName)) { - deserializedDatabaseAadAuthInfo.username = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDatabaseAadAuthInfo; - }); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DeleteOrUpdateBehavior.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DeleteOrUpdateBehavior.java deleted file mode 100644 index 1e2b5935dfb58..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DeleteOrUpdateBehavior.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The cleanup behavior to indicate whether clean up operation when resource is deleted or updated. - */ -public final class DeleteOrUpdateBehavior extends ExpandableStringEnum { - /** - * Static value Default for DeleteOrUpdateBehavior. - */ - public static final DeleteOrUpdateBehavior DEFAULT = fromString("Default"); - - /** - * Static value ForcedCleanup for DeleteOrUpdateBehavior. - */ - public static final DeleteOrUpdateBehavior FORCED_CLEANUP = fromString("ForcedCleanup"); - - /** - * Creates a new instance of DeleteOrUpdateBehavior value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DeleteOrUpdateBehavior() { - } - - /** - * Creates or finds a DeleteOrUpdateBehavior from its string representation. - * - * @param name a name to look for. - * @return the corresponding DeleteOrUpdateBehavior. - */ - public static DeleteOrUpdateBehavior fromString(String name) { - return fromString(name, DeleteOrUpdateBehavior.class); - } - - /** - * Gets known DeleteOrUpdateBehavior values. - * - * @return known DeleteOrUpdateBehavior values. - */ - public static Collection values() { - return values(DeleteOrUpdateBehavior.class); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunActionName.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunActionName.java deleted file mode 100644 index 8d99144988b10..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunActionName.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The name of action for you dryrun job. - */ -public final class DryrunActionName extends ExpandableStringEnum { - /** - * Static value createOrUpdate for DryrunActionName. - */ - public static final DryrunActionName CREATE_OR_UPDATE = fromString("createOrUpdate"); - - /** - * Creates a new instance of DryrunActionName value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DryrunActionName() { - } - - /** - * Creates or finds a DryrunActionName from its string representation. - * - * @param name a name to look for. - * @return the corresponding DryrunActionName. - */ - public static DryrunActionName fromString(String name) { - return fromString(name, DryrunActionName.class); - } - - /** - * Gets known DryrunActionName values. - * - * @return known DryrunActionName values. - */ - public static Collection values() { - return values(DryrunActionName.class); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunList.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunList.java deleted file mode 100644 index 39156cf706a59..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunList.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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.servicelinker.fluent.models.DryrunResourceInner; -import java.io.IOException; -import java.util.List; - -/** - * The list of dryrun. - */ -@Fluent -public final class DryrunList implements JsonSerializable { - /* - * The link used to get the next page of dryrun list. - */ - private String nextLink; - - /* - * The list of dryrun. - */ - private List value; - - /** - * Creates an instance of DryrunList class. - */ - public DryrunList() { - } - - /** - * Get the nextLink property: The link used to get the next page of dryrun list. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link used to get the next page of dryrun list. - * - * @param nextLink the nextLink value to set. - * @return the DryrunList object itself. - */ - public DryrunList withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Get the value property: The list of dryrun. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of dryrun. - * - * @param value the value value to set. - * @return the DryrunList object itself. - */ - public DryrunList 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)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DryrunList from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DryrunList 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 DryrunList. - */ - public static DryrunList fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DryrunList deserializedDryrunList = new DryrunList(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("nextLink".equals(fieldName)) { - deserializedDryrunList.nextLink = reader.getString(); - } else if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> DryrunResourceInner.fromJson(reader1)); - deserializedDryrunList.value = value; - } else { - reader.skipChildren(); - } - } - - return deserializedDryrunList; - }); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunOperationPreview.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunOperationPreview.java deleted file mode 100644 index ae22fd8e0402d..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunOperationPreview.java +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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 preview of the operations for creation. - */ -@Fluent -public final class DryrunOperationPreview implements JsonSerializable { - /* - * The operation name - */ - private String name; - - /* - * The operation type - */ - private DryrunPreviewOperationType operationType; - - /* - * The description of the operation - */ - private String description; - - /* - * The action defined by RBAC, refer - * https://docs.microsoft.com/azure/role-based-access-control/role-definitions#actions-format - */ - private String action; - - /* - * The scope of the operation, refer https://docs.microsoft.com/azure/role-based-access-control/scope-overview - */ - private String scope; - - /** - * Creates an instance of DryrunOperationPreview class. - */ - public DryrunOperationPreview() { - } - - /** - * Get the name property: The operation name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The operation name. - * - * @param name the name value to set. - * @return the DryrunOperationPreview object itself. - */ - public DryrunOperationPreview withName(String name) { - this.name = name; - return this; - } - - /** - * Get the operationType property: The operation type. - * - * @return the operationType value. - */ - public DryrunPreviewOperationType operationType() { - return this.operationType; - } - - /** - * Set the operationType property: The operation type. - * - * @param operationType the operationType value to set. - * @return the DryrunOperationPreview object itself. - */ - public DryrunOperationPreview withOperationType(DryrunPreviewOperationType operationType) { - this.operationType = operationType; - return this; - } - - /** - * Get the description property: The description of the operation. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: The description of the operation. - * - * @param description the description value to set. - * @return the DryrunOperationPreview object itself. - */ - public DryrunOperationPreview withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the action property: The action defined by RBAC, refer - * https://docs.microsoft.com/azure/role-based-access-control/role-definitions#actions-format. - * - * @return the action value. - */ - public String action() { - return this.action; - } - - /** - * Set the action property: The action defined by RBAC, refer - * https://docs.microsoft.com/azure/role-based-access-control/role-definitions#actions-format. - * - * @param action the action value to set. - * @return the DryrunOperationPreview object itself. - */ - public DryrunOperationPreview withAction(String action) { - this.action = action; - return this; - } - - /** - * Get the scope property: The scope of the operation, refer - * https://docs.microsoft.com/azure/role-based-access-control/scope-overview. - * - * @return the scope value. - */ - public String scope() { - return this.scope; - } - - /** - * Set the scope property: The scope of the operation, refer - * https://docs.microsoft.com/azure/role-based-access-control/scope-overview. - * - * @param scope the scope value to set. - * @return the DryrunOperationPreview object itself. - */ - public DryrunOperationPreview withScope(String scope) { - this.scope = scope; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("operationType", this.operationType == null ? null : this.operationType.toString()); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeStringField("action", this.action); - jsonWriter.writeStringField("scope", this.scope); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DryrunOperationPreview from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DryrunOperationPreview 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 DryrunOperationPreview. - */ - public static DryrunOperationPreview fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DryrunOperationPreview deserializedDryrunOperationPreview = new DryrunOperationPreview(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedDryrunOperationPreview.name = reader.getString(); - } else if ("operationType".equals(fieldName)) { - deserializedDryrunOperationPreview.operationType - = DryrunPreviewOperationType.fromString(reader.getString()); - } else if ("description".equals(fieldName)) { - deserializedDryrunOperationPreview.description = reader.getString(); - } else if ("action".equals(fieldName)) { - deserializedDryrunOperationPreview.action = reader.getString(); - } else if ("scope".equals(fieldName)) { - deserializedDryrunOperationPreview.scope = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDryrunOperationPreview; - }); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunParameters.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunParameters.java deleted file mode 100644 index a34ec858d575c..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunParameters.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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 parameters of the dryrun. - */ -@Immutable -public class DryrunParameters implements JsonSerializable { - /* - * The name of action for you dryrun job. - */ - private DryrunActionName actionName = DryrunActionName.fromString("DryrunParameters"); - - /** - * Creates an instance of DryrunParameters class. - */ - public DryrunParameters() { - } - - /** - * Get the actionName property: The name of action for you dryrun job. - * - * @return the actionName value. - */ - public DryrunActionName actionName() { - return this.actionName; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("actionName", this.actionName == null ? null : this.actionName.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DryrunParameters from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DryrunParameters 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 DryrunParameters. - */ - public static DryrunParameters fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("actionName".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("createOrUpdate".equals(discriminatorValue)) { - return CreateOrUpdateDryrunParameters.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static DryrunParameters fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DryrunParameters deserializedDryrunParameters = new DryrunParameters(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("actionName".equals(fieldName)) { - deserializedDryrunParameters.actionName = DryrunActionName.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedDryrunParameters; - }); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunPatch.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunPatch.java deleted file mode 100644 index 4522ace0bb8f3..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunPatch.java +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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.servicelinker.fluent.models.DryrunProperties; -import java.io.IOException; -import java.util.List; - -/** - * a dryrun job to be updated. - */ -@Fluent -public final class DryrunPatch implements JsonSerializable { - /* - * The properties of the dryrun job. - */ - private DryrunProperties innerProperties; - - /** - * Creates an instance of DryrunPatch class. - */ - public DryrunPatch() { - } - - /** - * Get the innerProperties property: The properties of the dryrun job. - * - * @return the innerProperties value. - */ - private DryrunProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the parameters property: The parameters of the dryrun. - * - * @return the parameters value. - */ - public DryrunParameters parameters() { - return this.innerProperties() == null ? null : this.innerProperties().parameters(); - } - - /** - * Set the parameters property: The parameters of the dryrun. - * - * @param parameters the parameters value to set. - * @return the DryrunPatch object itself. - */ - public DryrunPatch withParameters(DryrunParameters parameters) { - if (this.innerProperties() == null) { - this.innerProperties = new DryrunProperties(); - } - this.innerProperties().withParameters(parameters); - return this; - } - - /** - * Get the prerequisiteResults property: the result of the dryrun. - * - * @return the prerequisiteResults value. - */ - public List prerequisiteResults() { - return this.innerProperties() == null ? null : this.innerProperties().prerequisiteResults(); - } - - /** - * Get the operationPreviews property: the preview of the operations for creation. - * - * @return the operationPreviews value. - */ - public List operationPreviews() { - return this.innerProperties() == null ? null : this.innerProperties().operationPreviews(); - } - - /** - * Get the provisioningState property: The provisioning state. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DryrunPatch from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DryrunPatch 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 DryrunPatch. - */ - public static DryrunPatch fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DryrunPatch deserializedDryrunPatch = new DryrunPatch(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedDryrunPatch.innerProperties = DryrunProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDryrunPatch; - }); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunPrerequisiteResult.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunPrerequisiteResult.java deleted file mode 100644 index 8974d65d13de7..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunPrerequisiteResult.java +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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; - -/** - * A result of dryrun. - */ -@Immutable -public class DryrunPrerequisiteResult implements JsonSerializable { - /* - * The type of dryrun result. - */ - private DryrunPrerequisiteResultType type = DryrunPrerequisiteResultType.fromString("DryrunPrerequisiteResult"); - - /** - * Creates an instance of DryrunPrerequisiteResult class. - */ - public DryrunPrerequisiteResult() { - } - - /** - * Get the type property: The type of dryrun result. - * - * @return the type value. - */ - public DryrunPrerequisiteResultType type() { - return this.type; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DryrunPrerequisiteResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DryrunPrerequisiteResult 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 DryrunPrerequisiteResult. - */ - public static DryrunPrerequisiteResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("type".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("basicError".equals(discriminatorValue)) { - return BasicErrorDryrunPrerequisiteResult.fromJson(readerToUse.reset()); - } else if ("permissionsMissing".equals(discriminatorValue)) { - return PermissionsMissingDryrunPrerequisiteResult.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static DryrunPrerequisiteResult fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DryrunPrerequisiteResult deserializedDryrunPrerequisiteResult = new DryrunPrerequisiteResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedDryrunPrerequisiteResult.type - = DryrunPrerequisiteResultType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedDryrunPrerequisiteResult; - }); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunPrerequisiteResultType.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunPrerequisiteResultType.java deleted file mode 100644 index 1446010d65279..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunPrerequisiteResultType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The type of dryrun result. - */ -public final class DryrunPrerequisiteResultType extends ExpandableStringEnum { - /** - * Static value basicError for DryrunPrerequisiteResultType. - */ - public static final DryrunPrerequisiteResultType BASIC_ERROR = fromString("basicError"); - - /** - * Static value permissionsMissing for DryrunPrerequisiteResultType. - */ - public static final DryrunPrerequisiteResultType PERMISSIONS_MISSING = fromString("permissionsMissing"); - - /** - * Creates a new instance of DryrunPrerequisiteResultType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DryrunPrerequisiteResultType() { - } - - /** - * Creates or finds a DryrunPrerequisiteResultType from its string representation. - * - * @param name a name to look for. - * @return the corresponding DryrunPrerequisiteResultType. - */ - public static DryrunPrerequisiteResultType fromString(String name) { - return fromString(name, DryrunPrerequisiteResultType.class); - } - - /** - * Gets known DryrunPrerequisiteResultType values. - * - * @return known DryrunPrerequisiteResultType values. - */ - public static Collection values() { - return values(DryrunPrerequisiteResultType.class); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunPreviewOperationType.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunPreviewOperationType.java deleted file mode 100644 index 42ba8a25920ea..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunPreviewOperationType.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The operation type. - */ -public final class DryrunPreviewOperationType extends ExpandableStringEnum { - /** - * Static value configConnection for DryrunPreviewOperationType. - */ - public static final DryrunPreviewOperationType CONFIG_CONNECTION = fromString("configConnection"); - - /** - * Static value configNetwork for DryrunPreviewOperationType. - */ - public static final DryrunPreviewOperationType CONFIG_NETWORK = fromString("configNetwork"); - - /** - * Static value configAuth for DryrunPreviewOperationType. - */ - public static final DryrunPreviewOperationType CONFIG_AUTH = fromString("configAuth"); - - /** - * Creates a new instance of DryrunPreviewOperationType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DryrunPreviewOperationType() { - } - - /** - * Creates or finds a DryrunPreviewOperationType from its string representation. - * - * @param name a name to look for. - * @return the corresponding DryrunPreviewOperationType. - */ - public static DryrunPreviewOperationType fromString(String name) { - return fromString(name, DryrunPreviewOperationType.class); - } - - /** - * Gets known DryrunPreviewOperationType values. - * - * @return known DryrunPreviewOperationType values. - */ - public static Collection values() { - return values(DryrunPreviewOperationType.class); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunResource.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunResource.java deleted file mode 100644 index 40aa6e2c091f0..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunResource.java +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.servicelinker.fluent.models.DryrunResourceInner; -import java.util.List; - -/** - * An immutable client-side representation of DryrunResource. - */ -public interface DryrunResource { - /** - * 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 parameters property: The parameters of the dryrun. - * - * @return the parameters value. - */ - DryrunParameters parameters(); - - /** - * Gets the prerequisiteResults property: the result of the dryrun. - * - * @return the prerequisiteResults value. - */ - List prerequisiteResults(); - - /** - * Gets the operationPreviews property: the preview of the operations for creation. - * - * @return the operationPreviews value. - */ - List operationPreviews(); - - /** - * Gets the provisioningState property: The provisioning state. - * - * @return the provisioningState value. - */ - String provisioningState(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.servicelinker.fluent.models.DryrunResourceInner object. - * - * @return the inner object. - */ - DryrunResourceInner innerModel(); - - /** - * The entirety of the DryrunResource definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The DryrunResource definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the DryrunResource definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the DryrunResource definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies subscriptionId, resourceGroupName, location. - * - * @param subscriptionId The ID of the target subscription. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param location The name of Azure region. - * @return the next definition stage. - */ - WithCreate withExistingLocation(String subscriptionId, String resourceGroupName, String location); - } - - /** - * The stage of the DryrunResource 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.WithParameters { - /** - * Executes the create request. - * - * @return the created resource. - */ - DryrunResource create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - DryrunResource create(Context context); - } - - /** - * The stage of the DryrunResource definition allowing to specify parameters. - */ - interface WithParameters { - /** - * Specifies the parameters property: The parameters of the dryrun. - * - * @param parameters The parameters of the dryrun. - * @return the next definition stage. - */ - WithCreate withParameters(DryrunParameters parameters); - } - } - - /** - * Begins update for the DryrunResource resource. - * - * @return the stage of resource update. - */ - DryrunResource.Update update(); - - /** - * The template for DryrunResource update. - */ - interface Update extends UpdateStages.WithParameters { - /** - * Executes the update request. - * - * @return the updated resource. - */ - DryrunResource apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - DryrunResource apply(Context context); - } - - /** - * The DryrunResource update stages. - */ - interface UpdateStages { - /** - * The stage of the DryrunResource update allowing to specify parameters. - */ - interface WithParameters { - /** - * Specifies the parameters property: The parameters of the dryrun. - * - * @param parameters The parameters of the dryrun. - * @return the next definition stage. - */ - Update withParameters(DryrunParameters parameters); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - DryrunResource refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - DryrunResource refresh(Context context); -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/EasyAuthMicrosoftEntraIdAuthInfo.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/EasyAuthMicrosoftEntraIdAuthInfo.java deleted file mode 100644 index e1f44ce84926b..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/EasyAuthMicrosoftEntraIdAuthInfo.java +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The authentication info when authType is EasyAuth Microsoft Entra ID. - */ -@Fluent -public final class EasyAuthMicrosoftEntraIdAuthInfo extends AuthInfoBase { - /* - * The authentication type. - */ - private AuthType authType = AuthType.EASY_AUTH_MICROSOFT_ENTRA_ID; - - /* - * Application clientId for EasyAuth Microsoft Entra ID. - */ - private String clientId; - - /* - * Application Secret for EasyAuth Microsoft Entra ID. - */ - private String secret; - - /* - * Indicates whether to clean up previous operation when Linker is updating or deleting - */ - private DeleteOrUpdateBehavior deleteOrUpdateBehavior; - - /** - * Creates an instance of EasyAuthMicrosoftEntraIdAuthInfo class. - */ - public EasyAuthMicrosoftEntraIdAuthInfo() { - } - - /** - * Get the authType property: The authentication type. - * - * @return the authType value. - */ - @Override - public AuthType authType() { - return this.authType; - } - - /** - * Get the clientId property: Application clientId for EasyAuth Microsoft Entra ID. - * - * @return the clientId value. - */ - public String clientId() { - return this.clientId; - } - - /** - * Set the clientId property: Application clientId for EasyAuth Microsoft Entra ID. - * - * @param clientId the clientId value to set. - * @return the EasyAuthMicrosoftEntraIdAuthInfo object itself. - */ - public EasyAuthMicrosoftEntraIdAuthInfo withClientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Get the secret property: Application Secret for EasyAuth Microsoft Entra ID. - * - * @return the secret value. - */ - public String secret() { - return this.secret; - } - - /** - * Set the secret property: Application Secret for EasyAuth Microsoft Entra ID. - * - * @param secret the secret value to set. - * @return the EasyAuthMicrosoftEntraIdAuthInfo object itself. - */ - public EasyAuthMicrosoftEntraIdAuthInfo withSecret(String secret) { - this.secret = secret; - return this; - } - - /** - * Get the deleteOrUpdateBehavior property: Indicates whether to clean up previous operation when Linker is updating - * or deleting. - * - * @return the deleteOrUpdateBehavior value. - */ - public DeleteOrUpdateBehavior deleteOrUpdateBehavior() { - return this.deleteOrUpdateBehavior; - } - - /** - * Set the deleteOrUpdateBehavior property: Indicates whether to clean up previous operation when Linker is updating - * or deleting. - * - * @param deleteOrUpdateBehavior the deleteOrUpdateBehavior value to set. - * @return the EasyAuthMicrosoftEntraIdAuthInfo object itself. - */ - public EasyAuthMicrosoftEntraIdAuthInfo withDeleteOrUpdateBehavior(DeleteOrUpdateBehavior deleteOrUpdateBehavior) { - this.deleteOrUpdateBehavior = deleteOrUpdateBehavior; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public EasyAuthMicrosoftEntraIdAuthInfo withAuthMode(AuthMode authMode) { - super.withAuthMode(authMode); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("authMode", authMode() == null ? null : authMode().toString()); - jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); - jsonWriter.writeStringField("clientId", this.clientId); - jsonWriter.writeStringField("secret", this.secret); - jsonWriter.writeStringField("deleteOrUpdateBehavior", - this.deleteOrUpdateBehavior == null ? null : this.deleteOrUpdateBehavior.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EasyAuthMicrosoftEntraIdAuthInfo from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EasyAuthMicrosoftEntraIdAuthInfo 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 EasyAuthMicrosoftEntraIdAuthInfo. - */ - public static EasyAuthMicrosoftEntraIdAuthInfo fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EasyAuthMicrosoftEntraIdAuthInfo deserializedEasyAuthMicrosoftEntraIdAuthInfo - = new EasyAuthMicrosoftEntraIdAuthInfo(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("authMode".equals(fieldName)) { - deserializedEasyAuthMicrosoftEntraIdAuthInfo.withAuthMode(AuthMode.fromString(reader.getString())); - } else if ("authType".equals(fieldName)) { - deserializedEasyAuthMicrosoftEntraIdAuthInfo.authType = AuthType.fromString(reader.getString()); - } else if ("clientId".equals(fieldName)) { - deserializedEasyAuthMicrosoftEntraIdAuthInfo.clientId = reader.getString(); - } else if ("secret".equals(fieldName)) { - deserializedEasyAuthMicrosoftEntraIdAuthInfo.secret = reader.getString(); - } else if ("deleteOrUpdateBehavior".equals(fieldName)) { - deserializedEasyAuthMicrosoftEntraIdAuthInfo.deleteOrUpdateBehavior - = DeleteOrUpdateBehavior.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedEasyAuthMicrosoftEntraIdAuthInfo; - }); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/FabricPlatform.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/FabricPlatform.java deleted file mode 100644 index a1a4acfe7eff5..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/FabricPlatform.java +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The service properties when target service type is FabricPlatform. - */ -@Fluent -public final class FabricPlatform extends TargetServiceBase { - /* - * The target service type. - */ - private TargetServiceType type = TargetServiceType.FABRIC_PLATFORM; - - /* - * The endpoint of service. - */ - private String endpoint; - - /** - * Creates an instance of FabricPlatform class. - */ - public FabricPlatform() { - } - - /** - * Get the type property: The target service type. - * - * @return the type value. - */ - @Override - public TargetServiceType type() { - return this.type; - } - - /** - * Get the endpoint property: The endpoint of service. - * - * @return the endpoint value. - */ - public String endpoint() { - return this.endpoint; - } - - /** - * Set the endpoint property: The endpoint of service. - * - * @param endpoint the endpoint value to set. - * @return the FabricPlatform object itself. - */ - public FabricPlatform withEndpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("endpoint", this.endpoint); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FabricPlatform from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FabricPlatform 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 FabricPlatform. - */ - public static FabricPlatform fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FabricPlatform deserializedFabricPlatform = new FabricPlatform(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedFabricPlatform.type = TargetServiceType.fromString(reader.getString()); - } else if ("endpoint".equals(fieldName)) { - deserializedFabricPlatform.endpoint = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedFabricPlatform; - }); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/FirewallRules.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/FirewallRules.java deleted file mode 100644 index a2742f2469e3c..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/FirewallRules.java +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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; -import java.util.List; - -/** - * Target service's firewall rules. to allow connections from source service. - */ -@Fluent -public final class FirewallRules implements JsonSerializable { - /* - * This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list - * of client IPs for a given database account. - */ - private List ipRanges; - - /* - * Allow Azure services to access the target service if true. - */ - private AllowType azureServices; - - /* - * Allow caller client IP to access the target service if true. the property is used when connecting local - * application to target service. - */ - private AllowType callerClientIp; - - /** - * Creates an instance of FirewallRules class. - */ - public FirewallRules() { - } - - /** - * Get the ipRanges property: This value specifies the set of IP addresses or IP address ranges in CIDR form to be - * included as the allowed list of client IPs for a given database account. - * - * @return the ipRanges value. - */ - public List ipRanges() { - return this.ipRanges; - } - - /** - * Set the ipRanges property: This value specifies the set of IP addresses or IP address ranges in CIDR form to be - * included as the allowed list of client IPs for a given database account. - * - * @param ipRanges the ipRanges value to set. - * @return the FirewallRules object itself. - */ - public FirewallRules withIpRanges(List ipRanges) { - this.ipRanges = ipRanges; - return this; - } - - /** - * Get the azureServices property: Allow Azure services to access the target service if true. - * - * @return the azureServices value. - */ - public AllowType azureServices() { - return this.azureServices; - } - - /** - * Set the azureServices property: Allow Azure services to access the target service if true. - * - * @param azureServices the azureServices value to set. - * @return the FirewallRules object itself. - */ - public FirewallRules withAzureServices(AllowType azureServices) { - this.azureServices = azureServices; - return this; - } - - /** - * Get the callerClientIp property: Allow caller client IP to access the target service if true. the property is - * used when connecting local application to target service. - * - * @return the callerClientIp value. - */ - public AllowType callerClientIp() { - return this.callerClientIp; - } - - /** - * Set the callerClientIp property: Allow caller client IP to access the target service if true. the property is - * used when connecting local application to target service. - * - * @param callerClientIp the callerClientIp value to set. - * @return the FirewallRules object itself. - */ - public FirewallRules withCallerClientIp(AllowType callerClientIp) { - this.callerClientIp = callerClientIp; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("ipRanges", this.ipRanges, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("azureServices", this.azureServices == null ? null : this.azureServices.toString()); - jsonWriter.writeStringField("callerClientIP", - this.callerClientIp == null ? null : this.callerClientIp.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of FirewallRules from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of FirewallRules 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 FirewallRules. - */ - public static FirewallRules fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - FirewallRules deserializedFirewallRules = new FirewallRules(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("ipRanges".equals(fieldName)) { - List ipRanges = reader.readArray(reader1 -> reader1.getString()); - deserializedFirewallRules.ipRanges = ipRanges; - } else if ("azureServices".equals(fieldName)) { - deserializedFirewallRules.azureServices = AllowType.fromString(reader.getString()); - } else if ("callerClientIP".equals(fieldName)) { - deserializedFirewallRules.callerClientIp = AllowType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedFirewallRules; - }); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/LinkerConfigurationType.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/LinkerConfigurationType.java deleted file mode 100644 index 6a5523f068682..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/LinkerConfigurationType.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of configuration to determine whether the configuration can be modified after creation. KeyvaultSecret means the - * configuration references a key vault secret, such as App Service/ACA key vault reference. Default means the - * configuration is real value, such as user name, raw secret, etc. - */ -public final class LinkerConfigurationType extends ExpandableStringEnum { - /** - * Static value Default for LinkerConfigurationType. - */ - public static final LinkerConfigurationType DEFAULT = fromString("Default"); - - /** - * Static value KeyVaultSecret for LinkerConfigurationType. - */ - public static final LinkerConfigurationType KEY_VAULT_SECRET = fromString("KeyVaultSecret"); - - /** - * Creates a new instance of LinkerConfigurationType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public LinkerConfigurationType() { - } - - /** - * Creates or finds a LinkerConfigurationType from its string representation. - * - * @param name a name to look for. - * @return the corresponding LinkerConfigurationType. - */ - public static LinkerConfigurationType fromString(String name) { - return fromString(name, LinkerConfigurationType.class); - } - - /** - * Gets known LinkerConfigurationType values. - * - * @return known LinkerConfigurationType values. - */ - public static Collection values() { - return values(LinkerConfigurationType.class); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ResourceList.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/LinkerList.java similarity index 70% rename from sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ResourceList.java rename to sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/LinkerList.java index 280ca6aa00d55..eafd38a44fdba 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ResourceList.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/LinkerList.java @@ -17,9 +17,9 @@ * The list of Linker. */ @Fluent -public final class ResourceList implements JsonSerializable { +public final class LinkerList implements JsonSerializable { /* - * The Linker used to get the next page of Linker list. + * The link used to get the next page of Linker list. */ private String nextLink; @@ -29,13 +29,13 @@ public final class ResourceList implements JsonSerializable { private List value; /** - * Creates an instance of ResourceList class. + * Creates an instance of LinkerList class. */ - public ResourceList() { + public LinkerList() { } /** - * Get the nextLink property: The Linker used to get the next page of Linker list. + * Get the nextLink property: The link used to get the next page of Linker list. * * @return the nextLink value. */ @@ -44,12 +44,12 @@ public String nextLink() { } /** - * Set the nextLink property: The Linker used to get the next page of Linker list. + * Set the nextLink property: The link used to get the next page of Linker list. * * @param nextLink the nextLink value to set. - * @return the ResourceList object itself. + * @return the LinkerList object itself. */ - public ResourceList withNextLink(String nextLink) { + public LinkerList withNextLink(String nextLink) { this.nextLink = nextLink; return this; } @@ -67,9 +67,9 @@ public List value() { * Set the value property: The list of Linkers. * * @param value the value value to set. - * @return the ResourceList object itself. + * @return the LinkerList object itself. */ - public ResourceList withValue(List value) { + public LinkerList withValue(List value) { this.value = value; return this; } @@ -97,32 +97,32 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { } /** - * Reads an instance of ResourceList from the JsonReader. + * Reads an instance of LinkerList from the JsonReader. * * @param jsonReader The JsonReader being read. - * @return An instance of ResourceList 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 ResourceList. + * @return An instance of LinkerList 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 LinkerList. */ - public static ResourceList fromJson(JsonReader jsonReader) throws IOException { + public static LinkerList fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { - ResourceList deserializedResourceList = new ResourceList(); + LinkerList deserializedLinkerList = new LinkerList(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); if ("nextLink".equals(fieldName)) { - deserializedResourceList.nextLink = reader.getString(); + deserializedLinkerList.nextLink = reader.getString(); } else if ("value".equals(fieldName)) { List value = reader.readArray(reader1 -> LinkerResourceInner.fromJson(reader1)); - deserializedResourceList.value = value; + deserializedLinkerList.value = value; } else { reader.skipChildren(); } } - return deserializedResourceList; + return deserializedLinkerList; }); } } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/LinkerPatch.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/LinkerPatch.java index e75995eec6763..1d197ad5b89b7 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/LinkerPatch.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/LinkerPatch.java @@ -13,7 +13,7 @@ import java.io.IOException; /** - * A Linker to be updated. + * A linker to be updated. */ @Fluent public final class LinkerPatch implements JsonSerializable { @@ -184,54 +184,6 @@ public LinkerPatch withScope(String scope) { return this; } - /** - * Get the publicNetworkSolution property: The network solution. - * - * @return the publicNetworkSolution value. - */ - public PublicNetworkSolution publicNetworkSolution() { - return this.innerProperties() == null ? null : this.innerProperties().publicNetworkSolution(); - } - - /** - * Set the publicNetworkSolution property: The network solution. - * - * @param publicNetworkSolution the publicNetworkSolution value to set. - * @return the LinkerPatch object itself. - */ - public LinkerPatch withPublicNetworkSolution(PublicNetworkSolution publicNetworkSolution) { - if (this.innerProperties() == null) { - this.innerProperties = new LinkerProperties(); - } - this.innerProperties().withPublicNetworkSolution(publicNetworkSolution); - return this; - } - - /** - * Get the configurationInfo property: The connection information consumed by applications, including secrets, - * connection strings. - * - * @return the configurationInfo value. - */ - public ConfigurationInfo configurationInfo() { - return this.innerProperties() == null ? null : this.innerProperties().configurationInfo(); - } - - /** - * Set the configurationInfo property: The connection information consumed by applications, including secrets, - * connection strings. - * - * @param configurationInfo the configurationInfo value to set. - * @return the LinkerPatch object itself. - */ - public LinkerPatch withConfigurationInfo(ConfigurationInfo configurationInfo) { - if (this.innerProperties() == null) { - this.innerProperties = new LinkerProperties(); - } - this.innerProperties().withConfigurationInfo(configurationInfo); - return this; - } - /** * Validates the instance. * diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/LinkerResource.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/LinkerResource.java index faf948efd9838..80d55f943caaf 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/LinkerResource.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/LinkerResource.java @@ -35,7 +35,7 @@ public interface LinkerResource { String type(); /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * Gets the systemData property: The system data. * * @return the systemData value. */ @@ -90,21 +90,6 @@ public interface LinkerResource { */ String scope(); - /** - * Gets the publicNetworkSolution property: The network solution. - * - * @return the publicNetworkSolution value. - */ - PublicNetworkSolution publicNetworkSolution(); - - /** - * Gets the configurationInfo property: The connection information consumed by applications, including secrets, - * connection strings. - * - * @return the configurationInfo value. - */ - ConfigurationInfo configurationInfo(); - /** * Gets the inner com.azure.resourcemanager.servicelinker.fluent.models.LinkerResourceInner object. * @@ -147,8 +132,7 @@ interface WithScopeStage { */ interface WithCreate extends DefinitionStages.WithTargetService, DefinitionStages.WithAuthInfo, DefinitionStages.WithClientType, - DefinitionStages.WithVNetSolution, DefinitionStages.WithSecretStore, DefinitionStages.WithScope, - DefinitionStages.WithPublicNetworkSolution, DefinitionStages.WithConfigurationInfo { + DefinitionStages.WithVNetSolution, DefinitionStages.WithSecretStore, DefinitionStages.WithScope { /** * Executes the create request. * @@ -242,34 +226,6 @@ interface WithScope { */ WithCreate withScope(String scope); } - - /** - * The stage of the LinkerResource definition allowing to specify publicNetworkSolution. - */ - interface WithPublicNetworkSolution { - /** - * Specifies the publicNetworkSolution property: The network solution.. - * - * @param publicNetworkSolution The network solution. - * @return the next definition stage. - */ - WithCreate withPublicNetworkSolution(PublicNetworkSolution publicNetworkSolution); - } - - /** - * The stage of the LinkerResource definition allowing to specify configurationInfo. - */ - interface WithConfigurationInfo { - /** - * Specifies the configurationInfo property: The connection information consumed by applications, including - * secrets, connection strings.. - * - * @param configurationInfo The connection information consumed by applications, including secrets, - * connection strings. - * @return the next definition stage. - */ - WithCreate withConfigurationInfo(ConfigurationInfo configurationInfo); - } } /** @@ -283,8 +239,7 @@ interface WithConfigurationInfo { * The template for LinkerResource update. */ interface Update extends UpdateStages.WithTargetService, UpdateStages.WithAuthInfo, UpdateStages.WithClientType, - UpdateStages.WithVNetSolution, UpdateStages.WithSecretStore, UpdateStages.WithScope, - UpdateStages.WithPublicNetworkSolution, UpdateStages.WithConfigurationInfo { + UpdateStages.WithVNetSolution, UpdateStages.WithSecretStore, UpdateStages.WithScope { /** * Executes the update request. * @@ -382,34 +337,6 @@ interface WithScope { */ Update withScope(String scope); } - - /** - * The stage of the LinkerResource update allowing to specify publicNetworkSolution. - */ - interface WithPublicNetworkSolution { - /** - * Specifies the publicNetworkSolution property: The network solution.. - * - * @param publicNetworkSolution The network solution. - * @return the next definition stage. - */ - Update withPublicNetworkSolution(PublicNetworkSolution publicNetworkSolution); - } - - /** - * The stage of the LinkerResource update allowing to specify configurationInfo. - */ - interface WithConfigurationInfo { - /** - * Specifies the configurationInfo property: The connection information consumed by applications, including - * secrets, connection strings.. - * - * @param configurationInfo The connection information consumed by applications, including secrets, - * connection strings. - * @return the next definition stage. - */ - Update withConfigurationInfo(ConfigurationInfo configurationInfo); - } } /** @@ -428,27 +355,27 @@ interface WithConfigurationInfo { LinkerResource refresh(Context context); /** - * Validate a Linker. + * Validate a link. * * @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 validation operation result for a Linker. + * @return the validation operation result for a linker. */ ValidateOperationResult validate(); /** - * Validate a Linker. + * Validate a link. * * @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 validation operation result for a Linker. + * @return the validation operation result for a linker. */ ValidateOperationResult validate(Context context); /** - * list source configurations for a Linker. + * list source configurations for a linker. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -457,14 +384,14 @@ interface WithConfigurationInfo { * @return configurations for source resource, include appSettings, connectionString and serviceBindings along with * {@link Response}. */ - Response listConfigurationsWithResponse(Context context); + Response listConfigurationsWithResponse(Context context); /** - * list source configurations for a Linker. + * list source configurations for a linker. * * @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 configurations for source resource, include appSettings, connectionString and serviceBindings. */ - ConfigurationResult listConfigurations(); + SourceConfigurationResult listConfigurations(); } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/Linkers.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/Linkers.java index 967f5a9c7e776..6f6b4b7e17817 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/Linkers.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/Linkers.java @@ -13,8 +13,7 @@ */ public interface Linkers { /** - * Returns list of Linkers which connects to the resource. which supports to config both application and target - * service during the resource provision. + * Returns list of Linkers which connects to the resource. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -25,8 +24,7 @@ public interface Linkers { PagedIterable list(String resourceUri); /** - * Returns list of Linkers which connects to the resource. which supports to config both application and target - * service during the resource provision. + * Returns list of Linkers which connects to the resource. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param context The context to associate with this operation. @@ -63,7 +61,7 @@ public interface Linkers { LinkerResource get(String resourceUri, String linkerName); /** - * Delete a Linker. + * Delete a link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -74,7 +72,7 @@ public interface Linkers { void deleteByResourceGroup(String resourceUri, String linkerName); /** - * Delete a Linker. + * Delete a link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -86,19 +84,19 @@ public interface Linkers { void delete(String resourceUri, String linkerName, Context context); /** - * Validate a Linker. + * Validate a link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker 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 validation operation result for a Linker. + * @return the validation operation result for a linker. */ ValidateOperationResult validate(String resourceUri, String linkerName); /** - * Validate a Linker. + * Validate a link. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -106,12 +104,12 @@ public interface Linkers { * @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 validation operation result for a Linker. + * @return the validation operation result for a linker. */ ValidateOperationResult validate(String resourceUri, String linkerName, Context context); /** - * list source configurations for a Linker. + * list source configurations for a linker. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -122,11 +120,11 @@ public interface Linkers { * @return configurations for source resource, include appSettings, connectionString and serviceBindings along with * {@link Response}. */ - Response listConfigurationsWithResponse(String resourceUri, String linkerName, + Response listConfigurationsWithResponse(String resourceUri, String linkerName, Context context); /** - * list source configurations for a Linker. + * list source configurations for a linker. * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. @@ -135,7 +133,7 @@ Response listConfigurationsWithResponse(String resourceUri, * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return configurations for source resource, include appSettings, connectionString and serviceBindings. */ - ConfigurationResult listConfigurations(String resourceUri, String linkerName); + SourceConfigurationResult listConfigurations(String resourceUri, String linkerName); /** * Returns Linker resource for a given name. @@ -161,7 +159,7 @@ Response listConfigurationsWithResponse(String resourceUri, Response getByIdWithResponse(String id, Context context); /** - * Delete a Linker. + * Delete a link. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -171,7 +169,7 @@ Response listConfigurationsWithResponse(String resourceUri, void deleteById(String id); /** - * Delete a Linker. + * Delete a link. * * @param id the resource ID. * @param context The context to associate with this operation. diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/LinkersOperations.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/LinkersOperations.java deleted file mode 100644 index 17d563176823a..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/LinkersOperations.java +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import com.azure.resourcemanager.servicelinker.fluent.models.DryrunResourceInner; - -/** - * Resource collection API of LinkersOperations. - */ -public interface LinkersOperations { - /** - * list dryrun jobs. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @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 dryrun as paginated response with {@link PagedIterable}. - */ - PagedIterable listDryrun(String resourceUri); - - /** - * list dryrun jobs. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @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 dryrun as paginated response with {@link PagedIterable}. - */ - PagedIterable listDryrun(String resourceUri, Context context); - - /** - * get a dryrun job. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @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 dryrun job along with {@link Response}. - */ - Response getDryrunWithResponse(String resourceUri, String dryrunName, Context context); - - /** - * get a dryrun job. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @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 dryrun job. - */ - DryrunResource getDryrun(String resourceUri, String dryrunName); - - /** - * create a dryrun job to do necessary check before actual creation. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource. - */ - DryrunResource createDryrun(String resourceUri, String dryrunName, DryrunResourceInner parameters); - - /** - * create a dryrun job to do necessary check before actual creation. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource. - */ - DryrunResource createDryrun(String resourceUri, String dryrunName, DryrunResourceInner parameters, Context context); - - /** - * add a dryrun job to do necessary check before actual creation. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource. - */ - DryrunResource updateDryrun(String resourceUri, String dryrunName, DryrunPatch parameters); - - /** - * add a dryrun job to do necessary check before actual creation. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @param parameters dryrun 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 dryrun job resource. - */ - DryrunResource updateDryrun(String resourceUri, String dryrunName, DryrunPatch parameters, Context context); - - /** - * delete a dryrun job. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @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 deleteDryrunWithResponse(String resourceUri, String dryrunName, Context context); - - /** - * delete a dryrun job. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param dryrunName The name of dryrun. - * @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 deleteDryrun(String resourceUri, String dryrunName); - - /** - * Generate configurations for a Linker. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param linkerName The name Linker resource. - * @param parameters Connection Info, including format, secret store, etc. - * @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 configurations for source resource, include appSettings, connectionString and serviceBindings along with - * {@link Response}. - */ - Response generateConfigurationsWithResponse(String resourceUri, String linkerName, - ConfigurationInfo parameters, Context context); - - /** - * Generate configurations for a Linker. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @param linkerName The name Linker 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 configurations for source resource, include appSettings, connectionString and serviceBindings. - */ - ConfigurationResult generateConfigurations(String resourceUri, String linkerName); - - /** - * List the dapr configuration supported by Service Connector. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @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 dapr configuration list supported by Service Connector as paginated response with {@link PagedIterable}. - */ - PagedIterable listDaprConfigurations(String resourceUri); - - /** - * List the dapr configuration supported by Service Connector. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. - * @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 dapr configuration list supported by Service Connector as paginated response with {@link PagedIterable}. - */ - PagedIterable listDaprConfigurations(String resourceUri, Context context); -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/PermissionsMissingDryrunPrerequisiteResult.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/PermissionsMissingDryrunPrerequisiteResult.java deleted file mode 100644 index 2ac4eddd0da3a..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/PermissionsMissingDryrunPrerequisiteResult.java +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The represent of missing permissions. - */ -@Fluent -public final class PermissionsMissingDryrunPrerequisiteResult extends DryrunPrerequisiteResult { - /* - * The type of dryrun result. - */ - private DryrunPrerequisiteResultType type = DryrunPrerequisiteResultType.PERMISSIONS_MISSING; - - /* - * The permission scope - */ - private String scope; - - /* - * The permission list - */ - private List permissions; - - /* - * The recommended role to resolve permissions missing - */ - private String recommendedRole; - - /** - * Creates an instance of PermissionsMissingDryrunPrerequisiteResult class. - */ - public PermissionsMissingDryrunPrerequisiteResult() { - } - - /** - * Get the type property: The type of dryrun result. - * - * @return the type value. - */ - @Override - public DryrunPrerequisiteResultType type() { - return this.type; - } - - /** - * Get the scope property: The permission scope. - * - * @return the scope value. - */ - public String scope() { - return this.scope; - } - - /** - * Set the scope property: The permission scope. - * - * @param scope the scope value to set. - * @return the PermissionsMissingDryrunPrerequisiteResult object itself. - */ - public PermissionsMissingDryrunPrerequisiteResult withScope(String scope) { - this.scope = scope; - return this; - } - - /** - * Get the permissions property: The permission list. - * - * @return the permissions value. - */ - public List permissions() { - return this.permissions; - } - - /** - * Set the permissions property: The permission list. - * - * @param permissions the permissions value to set. - * @return the PermissionsMissingDryrunPrerequisiteResult object itself. - */ - public PermissionsMissingDryrunPrerequisiteResult withPermissions(List permissions) { - this.permissions = permissions; - return this; - } - - /** - * Get the recommendedRole property: The recommended role to resolve permissions missing. - * - * @return the recommendedRole value. - */ - public String recommendedRole() { - return this.recommendedRole; - } - - /** - * Set the recommendedRole property: The recommended role to resolve permissions missing. - * - * @param recommendedRole the recommendedRole value to set. - * @return the PermissionsMissingDryrunPrerequisiteResult object itself. - */ - public PermissionsMissingDryrunPrerequisiteResult withRecommendedRole(String recommendedRole) { - this.recommendedRole = recommendedRole; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("scope", this.scope); - jsonWriter.writeArrayField("permissions", this.permissions, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("recommendedRole", this.recommendedRole); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PermissionsMissingDryrunPrerequisiteResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PermissionsMissingDryrunPrerequisiteResult 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 PermissionsMissingDryrunPrerequisiteResult. - */ - public static PermissionsMissingDryrunPrerequisiteResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PermissionsMissingDryrunPrerequisiteResult deserializedPermissionsMissingDryrunPrerequisiteResult - = new PermissionsMissingDryrunPrerequisiteResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedPermissionsMissingDryrunPrerequisiteResult.type - = DryrunPrerequisiteResultType.fromString(reader.getString()); - } else if ("scope".equals(fieldName)) { - deserializedPermissionsMissingDryrunPrerequisiteResult.scope = reader.getString(); - } else if ("permissions".equals(fieldName)) { - List permissions = reader.readArray(reader1 -> reader1.getString()); - deserializedPermissionsMissingDryrunPrerequisiteResult.permissions = permissions; - } else if ("recommendedRole".equals(fieldName)) { - deserializedPermissionsMissingDryrunPrerequisiteResult.recommendedRole = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPermissionsMissingDryrunPrerequisiteResult; - }); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/PublicNetworkSolution.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/PublicNetworkSolution.java deleted file mode 100644 index 89c999a86864e..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/PublicNetworkSolution.java +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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; - -/** - * Indicates public network solution, include firewall rules. - */ -@Fluent -public final class PublicNetworkSolution implements JsonSerializable { - /* - * Indicates whether to clean up previous operation(such as firewall rules) when Linker is updating or deleting - */ - private DeleteOrUpdateBehavior deleteOrUpdateBehavior; - - /* - * Optional. Indicates public network solution. If enable, enable public network access of target service with best - * try. Default is enable. If optOut, opt out public network access configuration. - */ - private ActionType action; - - /* - * Describe firewall rules of target service to make sure source application could connect to the target. - */ - private FirewallRules firewallRules; - - /** - * Creates an instance of PublicNetworkSolution class. - */ - public PublicNetworkSolution() { - } - - /** - * Get the deleteOrUpdateBehavior property: Indicates whether to clean up previous operation(such as firewall rules) - * when Linker is updating or deleting. - * - * @return the deleteOrUpdateBehavior value. - */ - public DeleteOrUpdateBehavior deleteOrUpdateBehavior() { - return this.deleteOrUpdateBehavior; - } - - /** - * Set the deleteOrUpdateBehavior property: Indicates whether to clean up previous operation(such as firewall rules) - * when Linker is updating or deleting. - * - * @param deleteOrUpdateBehavior the deleteOrUpdateBehavior value to set. - * @return the PublicNetworkSolution object itself. - */ - public PublicNetworkSolution withDeleteOrUpdateBehavior(DeleteOrUpdateBehavior deleteOrUpdateBehavior) { - this.deleteOrUpdateBehavior = deleteOrUpdateBehavior; - return this; - } - - /** - * Get the action property: Optional. Indicates public network solution. If enable, enable public network access of - * target service with best try. Default is enable. If optOut, opt out public network access configuration. - * - * @return the action value. - */ - public ActionType action() { - return this.action; - } - - /** - * Set the action property: Optional. Indicates public network solution. If enable, enable public network access of - * target service with best try. Default is enable. If optOut, opt out public network access configuration. - * - * @param action the action value to set. - * @return the PublicNetworkSolution object itself. - */ - public PublicNetworkSolution withAction(ActionType action) { - this.action = action; - return this; - } - - /** - * Get the firewallRules property: Describe firewall rules of target service to make sure source application could - * connect to the target. - * - * @return the firewallRules value. - */ - public FirewallRules firewallRules() { - return this.firewallRules; - } - - /** - * Set the firewallRules property: Describe firewall rules of target service to make sure source application could - * connect to the target. - * - * @param firewallRules the firewallRules value to set. - * @return the PublicNetworkSolution object itself. - */ - public PublicNetworkSolution withFirewallRules(FirewallRules firewallRules) { - this.firewallRules = firewallRules; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (firewallRules() != null) { - firewallRules().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("deleteOrUpdateBehavior", - this.deleteOrUpdateBehavior == null ? null : this.deleteOrUpdateBehavior.toString()); - jsonWriter.writeStringField("action", this.action == null ? null : this.action.toString()); - jsonWriter.writeJsonField("firewallRules", this.firewallRules); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PublicNetworkSolution from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PublicNetworkSolution 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 PublicNetworkSolution. - */ - public static PublicNetworkSolution fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PublicNetworkSolution deserializedPublicNetworkSolution = new PublicNetworkSolution(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("deleteOrUpdateBehavior".equals(fieldName)) { - deserializedPublicNetworkSolution.deleteOrUpdateBehavior - = DeleteOrUpdateBehavior.fromString(reader.getString()); - } else if ("action".equals(fieldName)) { - deserializedPublicNetworkSolution.action = ActionType.fromString(reader.getString()); - } else if ("firewallRules".equals(fieldName)) { - deserializedPublicNetworkSolution.firewallRules = FirewallRules.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPublicNetworkSolution; - }); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SecretAuthInfo.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SecretAuthInfo.java index 492f3042c169f..84bee1c42fda9 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SecretAuthInfo.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SecretAuthInfo.java @@ -86,15 +86,6 @@ public SecretAuthInfo withSecretInfo(SecretInfoBase secretInfo) { return this; } - /** - * {@inheritDoc} - */ - @Override - public SecretAuthInfo withAuthMode(AuthMode authMode) { - super.withAuthMode(authMode); - return this; - } - /** * Validates the instance. * @@ -113,7 +104,6 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("authMode", authMode() == null ? null : authMode().toString()); jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); jsonWriter.writeStringField("name", this.name); jsonWriter.writeJsonField("secretInfo", this.secretInfo); @@ -135,9 +125,7 @@ public static SecretAuthInfo fromJson(JsonReader jsonReader) throws IOException String fieldName = reader.getFieldName(); reader.nextToken(); - if ("authMode".equals(fieldName)) { - deserializedSecretAuthInfo.withAuthMode(AuthMode.fromString(reader.getString())); - } else if ("authType".equals(fieldName)) { + if ("authType".equals(fieldName)) { deserializedSecretAuthInfo.authType = AuthType.fromString(reader.getString()); } else if ("name".equals(fieldName)) { deserializedSecretAuthInfo.name = reader.getString(); diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SecretSourceType.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SecretSourceType.java deleted file mode 100644 index 285b1169082ca..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SecretSourceType.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The type of secret source. - */ -public final class SecretSourceType extends ExpandableStringEnum { - /** - * Static value rawValue for SecretSourceType. - */ - public static final SecretSourceType RAW_VALUE = fromString("rawValue"); - - /** - * Static value keyVaultSecret for SecretSourceType. - */ - public static final SecretSourceType KEY_VAULT_SECRET = fromString("keyVaultSecret"); - - /** - * Creates a new instance of SecretSourceType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SecretSourceType() { - } - - /** - * Creates or finds a SecretSourceType from its string representation. - * - * @param name a name to look for. - * @return the corresponding SecretSourceType. - */ - public static SecretSourceType fromString(String name) { - return fromString(name, SecretSourceType.class); - } - - /** - * Gets known SecretSourceType values. - * - * @return known SecretSourceType values. - */ - public static Collection values() { - return values(SecretSourceType.class); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SecretStore.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SecretStore.java index b6cdc8246c068..199572b801666 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SecretStore.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SecretStore.java @@ -21,11 +21,6 @@ public final class SecretStore implements JsonSerializable { */ private String keyVaultId; - /* - * The key vault secret name to store secret, only valid when storing one secret - */ - private String keyVaultSecretName; - /** * Creates an instance of SecretStore class. */ @@ -52,28 +47,6 @@ public SecretStore withKeyVaultId(String keyVaultId) { return this; } - /** - * Get the keyVaultSecretName property: The key vault secret name to store secret, only valid when storing one - * secret. - * - * @return the keyVaultSecretName value. - */ - public String keyVaultSecretName() { - return this.keyVaultSecretName; - } - - /** - * Set the keyVaultSecretName property: The key vault secret name to store secret, only valid when storing one - * secret. - * - * @param keyVaultSecretName the keyVaultSecretName value to set. - * @return the SecretStore object itself. - */ - public SecretStore withKeyVaultSecretName(String keyVaultSecretName) { - this.keyVaultSecretName = keyVaultSecretName; - return this; - } - /** * Validates the instance. * @@ -89,7 +62,6 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("keyVaultId", this.keyVaultId); - jsonWriter.writeStringField("keyVaultSecretName", this.keyVaultSecretName); return jsonWriter.writeEndObject(); } @@ -110,8 +82,6 @@ public static SecretStore fromJson(JsonReader jsonReader) throws IOException { if ("keyVaultId".equals(fieldName)) { deserializedSecretStore.keyVaultId = reader.getString(); - } else if ("keyVaultSecretName".equals(fieldName)) { - deserializedSecretStore.keyVaultSecretName = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SelfHostedServer.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SelfHostedServer.java deleted file mode 100644 index 685691954b943..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SelfHostedServer.java +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The service properties when target service type is SelfHostedServer. - */ -@Fluent -public final class SelfHostedServer extends TargetServiceBase { - /* - * The target service type. - */ - private TargetServiceType type = TargetServiceType.SELF_HOSTED_SERVER; - - /* - * The endpoint of service. - */ - private String endpoint; - - /** - * Creates an instance of SelfHostedServer class. - */ - public SelfHostedServer() { - } - - /** - * Get the type property: The target service type. - * - * @return the type value. - */ - @Override - public TargetServiceType type() { - return this.type; - } - - /** - * Get the endpoint property: The endpoint of service. - * - * @return the endpoint value. - */ - public String endpoint() { - return this.endpoint; - } - - /** - * Set the endpoint property: The endpoint of service. - * - * @param endpoint the endpoint value to set. - * @return the SelfHostedServer object itself. - */ - public SelfHostedServer withEndpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("endpoint", this.endpoint); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SelfHostedServer from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SelfHostedServer 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 SelfHostedServer. - */ - public static SelfHostedServer fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SelfHostedServer deserializedSelfHostedServer = new SelfHostedServer(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedSelfHostedServer.type = TargetServiceType.fromString(reader.getString()); - } else if ("endpoint".equals(fieldName)) { - deserializedSelfHostedServer.endpoint = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSelfHostedServer; - }); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ServicePrincipalCertificateAuthInfo.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ServicePrincipalCertificateAuthInfo.java index f96ec8ffb4468..3992048b73671 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ServicePrincipalCertificateAuthInfo.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ServicePrincipalCertificateAuthInfo.java @@ -10,7 +10,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.util.List; /** * The authentication info when authType is servicePrincipal certificate. @@ -37,16 +36,6 @@ public final class ServicePrincipalCertificateAuthInfo extends AuthInfoBase { */ private String certificate; - /* - * Indicates whether to clean up previous operation when Linker is updating or deleting - */ - private DeleteOrUpdateBehavior deleteOrUpdateBehavior; - - /* - * Optional, this value specifies the Azure roles to be assigned. Automatically - */ - private List roles; - /** * Creates an instance of ServicePrincipalCertificateAuthInfo class. */ @@ -123,58 +112,6 @@ public ServicePrincipalCertificateAuthInfo withCertificate(String certificate) { return this; } - /** - * Get the deleteOrUpdateBehavior property: Indicates whether to clean up previous operation when Linker is updating - * or deleting. - * - * @return the deleteOrUpdateBehavior value. - */ - public DeleteOrUpdateBehavior deleteOrUpdateBehavior() { - return this.deleteOrUpdateBehavior; - } - - /** - * Set the deleteOrUpdateBehavior property: Indicates whether to clean up previous operation when Linker is updating - * or deleting. - * - * @param deleteOrUpdateBehavior the deleteOrUpdateBehavior value to set. - * @return the ServicePrincipalCertificateAuthInfo object itself. - */ - public ServicePrincipalCertificateAuthInfo - withDeleteOrUpdateBehavior(DeleteOrUpdateBehavior deleteOrUpdateBehavior) { - this.deleteOrUpdateBehavior = deleteOrUpdateBehavior; - return this; - } - - /** - * Get the roles property: Optional, this value specifies the Azure roles to be assigned. Automatically. - * - * @return the roles value. - */ - public List roles() { - return this.roles; - } - - /** - * Set the roles property: Optional, this value specifies the Azure roles to be assigned. Automatically. - * - * @param roles the roles value to set. - * @return the ServicePrincipalCertificateAuthInfo object itself. - */ - public ServicePrincipalCertificateAuthInfo withRoles(List roles) { - this.roles = roles; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ServicePrincipalCertificateAuthInfo withAuthMode(AuthMode authMode) { - super.withAuthMode(authMode); - return this; - } - /** * Validates the instance. * @@ -207,14 +144,10 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("authMode", authMode() == null ? null : authMode().toString()); jsonWriter.writeStringField("clientId", this.clientId); jsonWriter.writeStringField("principalId", this.principalId); jsonWriter.writeStringField("certificate", this.certificate); jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); - jsonWriter.writeStringField("deleteOrUpdateBehavior", - this.deleteOrUpdateBehavior == null ? null : this.deleteOrUpdateBehavior.toString()); - jsonWriter.writeArrayField("roles", this.roles, (writer, element) -> writer.writeString(element)); return jsonWriter.writeEndObject(); } @@ -235,10 +168,7 @@ public static ServicePrincipalCertificateAuthInfo fromJson(JsonReader jsonReader String fieldName = reader.getFieldName(); reader.nextToken(); - if ("authMode".equals(fieldName)) { - deserializedServicePrincipalCertificateAuthInfo - .withAuthMode(AuthMode.fromString(reader.getString())); - } else if ("clientId".equals(fieldName)) { + if ("clientId".equals(fieldName)) { deserializedServicePrincipalCertificateAuthInfo.clientId = reader.getString(); } else if ("principalId".equals(fieldName)) { deserializedServicePrincipalCertificateAuthInfo.principalId = reader.getString(); @@ -246,12 +176,6 @@ public static ServicePrincipalCertificateAuthInfo fromJson(JsonReader jsonReader deserializedServicePrincipalCertificateAuthInfo.certificate = reader.getString(); } else if ("authType".equals(fieldName)) { deserializedServicePrincipalCertificateAuthInfo.authType = AuthType.fromString(reader.getString()); - } else if ("deleteOrUpdateBehavior".equals(fieldName)) { - deserializedServicePrincipalCertificateAuthInfo.deleteOrUpdateBehavior - = DeleteOrUpdateBehavior.fromString(reader.getString()); - } else if ("roles".equals(fieldName)) { - List roles = reader.readArray(reader1 -> reader1.getString()); - deserializedServicePrincipalCertificateAuthInfo.roles = roles; } else { reader.skipChildren(); } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ServicePrincipalSecretAuthInfo.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ServicePrincipalSecretAuthInfo.java index aaa97a9a586a8..a6da5b5df9c19 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ServicePrincipalSecretAuthInfo.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ServicePrincipalSecretAuthInfo.java @@ -10,7 +10,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.util.List; /** * The authentication info when authType is servicePrincipal secret. @@ -37,21 +36,6 @@ public final class ServicePrincipalSecretAuthInfo extends AuthInfoBase { */ private String secret; - /* - * Indicates whether to clean up previous operation when Linker is updating or deleting - */ - private DeleteOrUpdateBehavior deleteOrUpdateBehavior; - - /* - * Optional, this value specifies the Azure roles to be assigned. Automatically - */ - private List roles; - - /* - * Username created in the database which is mapped to a user in AAD. - */ - private String username; - /** * Creates an instance of ServicePrincipalSecretAuthInfo class. */ @@ -128,77 +112,6 @@ public ServicePrincipalSecretAuthInfo withSecret(String secret) { return this; } - /** - * Get the deleteOrUpdateBehavior property: Indicates whether to clean up previous operation when Linker is updating - * or deleting. - * - * @return the deleteOrUpdateBehavior value. - */ - public DeleteOrUpdateBehavior deleteOrUpdateBehavior() { - return this.deleteOrUpdateBehavior; - } - - /** - * Set the deleteOrUpdateBehavior property: Indicates whether to clean up previous operation when Linker is updating - * or deleting. - * - * @param deleteOrUpdateBehavior the deleteOrUpdateBehavior value to set. - * @return the ServicePrincipalSecretAuthInfo object itself. - */ - public ServicePrincipalSecretAuthInfo withDeleteOrUpdateBehavior(DeleteOrUpdateBehavior deleteOrUpdateBehavior) { - this.deleteOrUpdateBehavior = deleteOrUpdateBehavior; - return this; - } - - /** - * Get the roles property: Optional, this value specifies the Azure roles to be assigned. Automatically. - * - * @return the roles value. - */ - public List roles() { - return this.roles; - } - - /** - * Set the roles property: Optional, this value specifies the Azure roles to be assigned. Automatically. - * - * @param roles the roles value to set. - * @return the ServicePrincipalSecretAuthInfo object itself. - */ - public ServicePrincipalSecretAuthInfo withRoles(List roles) { - this.roles = roles; - return this; - } - - /** - * Get the username property: Username created in the database which is mapped to a user in AAD. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: Username created in the database which is mapped to a user in AAD. - * - * @param username the username value to set. - * @return the ServicePrincipalSecretAuthInfo object itself. - */ - public ServicePrincipalSecretAuthInfo withUsername(String username) { - this.username = username; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ServicePrincipalSecretAuthInfo withAuthMode(AuthMode authMode) { - super.withAuthMode(authMode); - return this; - } - /** * Validates the instance. * @@ -231,15 +144,10 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("authMode", authMode() == null ? null : authMode().toString()); jsonWriter.writeStringField("clientId", this.clientId); jsonWriter.writeStringField("principalId", this.principalId); jsonWriter.writeStringField("secret", this.secret); jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); - jsonWriter.writeStringField("deleteOrUpdateBehavior", - this.deleteOrUpdateBehavior == null ? null : this.deleteOrUpdateBehavior.toString()); - jsonWriter.writeArrayField("roles", this.roles, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("userName", this.username); return jsonWriter.writeEndObject(); } @@ -260,9 +168,7 @@ public static ServicePrincipalSecretAuthInfo fromJson(JsonReader jsonReader) thr String fieldName = reader.getFieldName(); reader.nextToken(); - if ("authMode".equals(fieldName)) { - deserializedServicePrincipalSecretAuthInfo.withAuthMode(AuthMode.fromString(reader.getString())); - } else if ("clientId".equals(fieldName)) { + if ("clientId".equals(fieldName)) { deserializedServicePrincipalSecretAuthInfo.clientId = reader.getString(); } else if ("principalId".equals(fieldName)) { deserializedServicePrincipalSecretAuthInfo.principalId = reader.getString(); @@ -270,14 +176,6 @@ public static ServicePrincipalSecretAuthInfo fromJson(JsonReader jsonReader) thr deserializedServicePrincipalSecretAuthInfo.secret = reader.getString(); } else if ("authType".equals(fieldName)) { deserializedServicePrincipalSecretAuthInfo.authType = AuthType.fromString(reader.getString()); - } else if ("deleteOrUpdateBehavior".equals(fieldName)) { - deserializedServicePrincipalSecretAuthInfo.deleteOrUpdateBehavior - = DeleteOrUpdateBehavior.fromString(reader.getString()); - } else if ("roles".equals(fieldName)) { - List roles = reader.readArray(reader1 -> reader1.getString()); - deserializedServicePrincipalSecretAuthInfo.roles = roles; - } else if ("userName".equals(fieldName)) { - deserializedServicePrincipalSecretAuthInfo.username = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SourceConfiguration.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SourceConfiguration.java index dc8c34d4ccf57..be4897f999dd9 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SourceConfiguration.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SourceConfiguration.java @@ -26,21 +26,6 @@ public final class SourceConfiguration implements JsonSerializable configurations(); /** - * Gets the inner com.azure.resourcemanager.servicelinker.fluent.models.ConfigurationResultInner object. + * Gets the inner com.azure.resourcemanager.servicelinker.fluent.models.SourceConfigurationResultInner object. * * @return the inner object. */ - ConfigurationResultInner innerModel(); + SourceConfigurationResultInner innerModel(); } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SystemAssignedIdentityAuthInfo.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SystemAssignedIdentityAuthInfo.java index 407004b39f40f..988caec0912c8 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SystemAssignedIdentityAuthInfo.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SystemAssignedIdentityAuthInfo.java @@ -4,38 +4,22 @@ package com.azure.resourcemanager.servicelinker.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.util.List; /** * The authentication info when authType is systemAssignedIdentity. */ -@Fluent +@Immutable public final class SystemAssignedIdentityAuthInfo extends AuthInfoBase { /* * The authentication type. */ private AuthType authType = AuthType.SYSTEM_ASSIGNED_IDENTITY; - /* - * Indicates whether to clean up previous operation when Linker is updating or deleting - */ - private DeleteOrUpdateBehavior deleteOrUpdateBehavior; - - /* - * Optional, this value specifies the Azure role to be assigned - */ - private List roles; - - /* - * Username created in the database which is mapped to a user in AAD. - */ - private String username; - /** * Creates an instance of SystemAssignedIdentityAuthInfo class. */ @@ -52,77 +36,6 @@ public AuthType authType() { return this.authType; } - /** - * Get the deleteOrUpdateBehavior property: Indicates whether to clean up previous operation when Linker is updating - * or deleting. - * - * @return the deleteOrUpdateBehavior value. - */ - public DeleteOrUpdateBehavior deleteOrUpdateBehavior() { - return this.deleteOrUpdateBehavior; - } - - /** - * Set the deleteOrUpdateBehavior property: Indicates whether to clean up previous operation when Linker is updating - * or deleting. - * - * @param deleteOrUpdateBehavior the deleteOrUpdateBehavior value to set. - * @return the SystemAssignedIdentityAuthInfo object itself. - */ - public SystemAssignedIdentityAuthInfo withDeleteOrUpdateBehavior(DeleteOrUpdateBehavior deleteOrUpdateBehavior) { - this.deleteOrUpdateBehavior = deleteOrUpdateBehavior; - return this; - } - - /** - * Get the roles property: Optional, this value specifies the Azure role to be assigned. - * - * @return the roles value. - */ - public List roles() { - return this.roles; - } - - /** - * Set the roles property: Optional, this value specifies the Azure role to be assigned. - * - * @param roles the roles value to set. - * @return the SystemAssignedIdentityAuthInfo object itself. - */ - public SystemAssignedIdentityAuthInfo withRoles(List roles) { - this.roles = roles; - return this; - } - - /** - * Get the username property: Username created in the database which is mapped to a user in AAD. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: Username created in the database which is mapped to a user in AAD. - * - * @param username the username value to set. - * @return the SystemAssignedIdentityAuthInfo object itself. - */ - public SystemAssignedIdentityAuthInfo withUsername(String username) { - this.username = username; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SystemAssignedIdentityAuthInfo withAuthMode(AuthMode authMode) { - super.withAuthMode(authMode); - return this; - } - /** * Validates the instance. * @@ -138,12 +51,7 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("authMode", authMode() == null ? null : authMode().toString()); jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); - jsonWriter.writeStringField("deleteOrUpdateBehavior", - this.deleteOrUpdateBehavior == null ? null : this.deleteOrUpdateBehavior.toString()); - jsonWriter.writeArrayField("roles", this.roles, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("userName", this.username); return jsonWriter.writeEndObject(); } @@ -163,18 +71,8 @@ public static SystemAssignedIdentityAuthInfo fromJson(JsonReader jsonReader) thr String fieldName = reader.getFieldName(); reader.nextToken(); - if ("authMode".equals(fieldName)) { - deserializedSystemAssignedIdentityAuthInfo.withAuthMode(AuthMode.fromString(reader.getString())); - } else if ("authType".equals(fieldName)) { + if ("authType".equals(fieldName)) { deserializedSystemAssignedIdentityAuthInfo.authType = AuthType.fromString(reader.getString()); - } else if ("deleteOrUpdateBehavior".equals(fieldName)) { - deserializedSystemAssignedIdentityAuthInfo.deleteOrUpdateBehavior - = DeleteOrUpdateBehavior.fromString(reader.getString()); - } else if ("roles".equals(fieldName)) { - List roles = reader.readArray(reader1 -> reader1.getString()); - deserializedSystemAssignedIdentityAuthInfo.roles = roles; - } else if ("userName".equals(fieldName)) { - deserializedSystemAssignedIdentityAuthInfo.username = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/TargetServiceBase.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/TargetServiceBase.java index 877b74b739f19..f8bb4abed6fd2 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/TargetServiceBase.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/TargetServiceBase.java @@ -82,10 +82,6 @@ public static TargetServiceBase fromJson(JsonReader jsonReader) throws IOExcepti return AzureResource.fromJson(readerToUse.reset()); } else if ("ConfluentBootstrapServer".equals(discriminatorValue)) { return ConfluentBootstrapServer.fromJson(readerToUse.reset()); - } else if ("FabricPlatform".equals(discriminatorValue)) { - return FabricPlatform.fromJson(readerToUse.reset()); - } else if ("SelfHostedServer".equals(discriminatorValue)) { - return SelfHostedServer.fromJson(readerToUse.reset()); } else if ("ConfluentSchemaRegistry".equals(discriminatorValue)) { return ConfluentSchemaRegistry.fromJson(readerToUse.reset()); } else { diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/TargetServiceType.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/TargetServiceType.java index 5e7228295c06a..39f692761edc3 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/TargetServiceType.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/TargetServiceType.java @@ -26,16 +26,6 @@ public final class TargetServiceType extends ExpandableStringEnum roles; - - /* - * Username created in the database which is mapped to a user in AAD. - */ - private String username; - - /** - * Creates an instance of UserAccountAuthInfo class. - */ - public UserAccountAuthInfo() { - } - - /** - * Get the authType property: The authentication type. - * - * @return the authType value. - */ - @Override - public AuthType authType() { - return this.authType; - } - - /** - * Get the principalId property: Principal Id for user account. - * - * @return the principalId value. - */ - public String principalId() { - return this.principalId; - } - - /** - * Set the principalId property: Principal Id for user account. - * - * @param principalId the principalId value to set. - * @return the UserAccountAuthInfo object itself. - */ - public UserAccountAuthInfo withPrincipalId(String principalId) { - this.principalId = principalId; - return this; - } - - /** - * Get the deleteOrUpdateBehavior property: Indicates whether to clean up previous operation when Linker is updating - * or deleting. - * - * @return the deleteOrUpdateBehavior value. - */ - public DeleteOrUpdateBehavior deleteOrUpdateBehavior() { - return this.deleteOrUpdateBehavior; - } - - /** - * Set the deleteOrUpdateBehavior property: Indicates whether to clean up previous operation when Linker is updating - * or deleting. - * - * @param deleteOrUpdateBehavior the deleteOrUpdateBehavior value to set. - * @return the UserAccountAuthInfo object itself. - */ - public UserAccountAuthInfo withDeleteOrUpdateBehavior(DeleteOrUpdateBehavior deleteOrUpdateBehavior) { - this.deleteOrUpdateBehavior = deleteOrUpdateBehavior; - return this; - } - - /** - * Get the roles property: Optional, this value specifies the Azure roles to be assigned. Automatically. - * - * @return the roles value. - */ - public List roles() { - return this.roles; - } - - /** - * Set the roles property: Optional, this value specifies the Azure roles to be assigned. Automatically. - * - * @param roles the roles value to set. - * @return the UserAccountAuthInfo object itself. - */ - public UserAccountAuthInfo withRoles(List roles) { - this.roles = roles; - return this; - } - - /** - * Get the username property: Username created in the database which is mapped to a user in AAD. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: Username created in the database which is mapped to a user in AAD. - * - * @param username the username value to set. - * @return the UserAccountAuthInfo object itself. - */ - public UserAccountAuthInfo withUsername(String username) { - this.username = username; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public UserAccountAuthInfo withAuthMode(AuthMode authMode) { - super.withAuthMode(authMode); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("authMode", authMode() == null ? null : authMode().toString()); - jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); - jsonWriter.writeStringField("principalId", this.principalId); - jsonWriter.writeStringField("deleteOrUpdateBehavior", - this.deleteOrUpdateBehavior == null ? null : this.deleteOrUpdateBehavior.toString()); - jsonWriter.writeArrayField("roles", this.roles, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("userName", this.username); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UserAccountAuthInfo from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UserAccountAuthInfo 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 UserAccountAuthInfo. - */ - public static UserAccountAuthInfo fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UserAccountAuthInfo deserializedUserAccountAuthInfo = new UserAccountAuthInfo(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("authMode".equals(fieldName)) { - deserializedUserAccountAuthInfo.withAuthMode(AuthMode.fromString(reader.getString())); - } else if ("authType".equals(fieldName)) { - deserializedUserAccountAuthInfo.authType = AuthType.fromString(reader.getString()); - } else if ("principalId".equals(fieldName)) { - deserializedUserAccountAuthInfo.principalId = reader.getString(); - } else if ("deleteOrUpdateBehavior".equals(fieldName)) { - deserializedUserAccountAuthInfo.deleteOrUpdateBehavior - = DeleteOrUpdateBehavior.fromString(reader.getString()); - } else if ("roles".equals(fieldName)) { - List roles = reader.readArray(reader1 -> reader1.getString()); - deserializedUserAccountAuthInfo.roles = roles; - } else if ("userName".equals(fieldName)) { - deserializedUserAccountAuthInfo.username = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedUserAccountAuthInfo; - }); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/UserAssignedIdentityAuthInfo.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/UserAssignedIdentityAuthInfo.java index 342898729724f..a19a2454085f2 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/UserAssignedIdentityAuthInfo.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/UserAssignedIdentityAuthInfo.java @@ -9,7 +9,6 @@ import com.azure.json.JsonToken; import com.azure.json.JsonWriter; import java.io.IOException; -import java.util.List; /** * The authentication info when authType is userAssignedIdentity. @@ -31,21 +30,6 @@ public final class UserAssignedIdentityAuthInfo extends AuthInfoBase { */ private String subscriptionId; - /* - * Indicates whether to clean up previous operation when Linker is updating or deleting - */ - private DeleteOrUpdateBehavior deleteOrUpdateBehavior; - - /* - * Optional, this value specifies the Azure role to be assigned - */ - private List roles; - - /* - * Username created in the database which is mapped to a user in AAD. - */ - private String username; - /** * Creates an instance of UserAssignedIdentityAuthInfo class. */ @@ -102,77 +86,6 @@ public UserAssignedIdentityAuthInfo withSubscriptionId(String subscriptionId) { return this; } - /** - * Get the deleteOrUpdateBehavior property: Indicates whether to clean up previous operation when Linker is updating - * or deleting. - * - * @return the deleteOrUpdateBehavior value. - */ - public DeleteOrUpdateBehavior deleteOrUpdateBehavior() { - return this.deleteOrUpdateBehavior; - } - - /** - * Set the deleteOrUpdateBehavior property: Indicates whether to clean up previous operation when Linker is updating - * or deleting. - * - * @param deleteOrUpdateBehavior the deleteOrUpdateBehavior value to set. - * @return the UserAssignedIdentityAuthInfo object itself. - */ - public UserAssignedIdentityAuthInfo withDeleteOrUpdateBehavior(DeleteOrUpdateBehavior deleteOrUpdateBehavior) { - this.deleteOrUpdateBehavior = deleteOrUpdateBehavior; - return this; - } - - /** - * Get the roles property: Optional, this value specifies the Azure role to be assigned. - * - * @return the roles value. - */ - public List roles() { - return this.roles; - } - - /** - * Set the roles property: Optional, this value specifies the Azure role to be assigned. - * - * @param roles the roles value to set. - * @return the UserAssignedIdentityAuthInfo object itself. - */ - public UserAssignedIdentityAuthInfo withRoles(List roles) { - this.roles = roles; - return this; - } - - /** - * Get the username property: Username created in the database which is mapped to a user in AAD. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: Username created in the database which is mapped to a user in AAD. - * - * @param username the username value to set. - * @return the UserAssignedIdentityAuthInfo object itself. - */ - public UserAssignedIdentityAuthInfo withUsername(String username) { - this.username = username; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public UserAssignedIdentityAuthInfo withAuthMode(AuthMode authMode) { - super.withAuthMode(authMode); - return this; - } - /** * Validates the instance. * @@ -188,14 +101,9 @@ public void validate() { @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("authMode", authMode() == null ? null : authMode().toString()); jsonWriter.writeStringField("authType", this.authType == null ? null : this.authType.toString()); jsonWriter.writeStringField("clientId", this.clientId); jsonWriter.writeStringField("subscriptionId", this.subscriptionId); - jsonWriter.writeStringField("deleteOrUpdateBehavior", - this.deleteOrUpdateBehavior == null ? null : this.deleteOrUpdateBehavior.toString()); - jsonWriter.writeArrayField("roles", this.roles, (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("userName", this.username); return jsonWriter.writeEndObject(); } @@ -214,22 +122,12 @@ public static UserAssignedIdentityAuthInfo fromJson(JsonReader jsonReader) throw String fieldName = reader.getFieldName(); reader.nextToken(); - if ("authMode".equals(fieldName)) { - deserializedUserAssignedIdentityAuthInfo.withAuthMode(AuthMode.fromString(reader.getString())); - } else if ("authType".equals(fieldName)) { + if ("authType".equals(fieldName)) { deserializedUserAssignedIdentityAuthInfo.authType = AuthType.fromString(reader.getString()); } else if ("clientId".equals(fieldName)) { deserializedUserAssignedIdentityAuthInfo.clientId = reader.getString(); } else if ("subscriptionId".equals(fieldName)) { deserializedUserAssignedIdentityAuthInfo.subscriptionId = reader.getString(); - } else if ("deleteOrUpdateBehavior".equals(fieldName)) { - deserializedUserAssignedIdentityAuthInfo.deleteOrUpdateBehavior - = DeleteOrUpdateBehavior.fromString(reader.getString()); - } else if ("roles".equals(fieldName)) { - List roles = reader.readArray(reader1 -> reader1.getString()); - deserializedUserAssignedIdentityAuthInfo.roles = roles; - } else if ("userName".equals(fieldName)) { - deserializedUserAssignedIdentityAuthInfo.username = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/VNetSolution.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/VNetSolution.java index 5dd2941c617e2..221ded1d55acc 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/VNetSolution.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/VNetSolution.java @@ -21,11 +21,6 @@ public final class VNetSolution implements JsonSerializable { */ private VNetSolutionType type; - /* - * Indicates whether to clean up previous operation when Linker is updating or deleting - */ - private DeleteOrUpdateBehavior deleteOrUpdateBehavior; - /** * Creates an instance of VNetSolution class. */ @@ -52,28 +47,6 @@ public VNetSolution withType(VNetSolutionType type) { return this; } - /** - * Get the deleteOrUpdateBehavior property: Indicates whether to clean up previous operation when Linker is updating - * or deleting. - * - * @return the deleteOrUpdateBehavior value. - */ - public DeleteOrUpdateBehavior deleteOrUpdateBehavior() { - return this.deleteOrUpdateBehavior; - } - - /** - * Set the deleteOrUpdateBehavior property: Indicates whether to clean up previous operation when Linker is updating - * or deleting. - * - * @param deleteOrUpdateBehavior the deleteOrUpdateBehavior value to set. - * @return the VNetSolution object itself. - */ - public VNetSolution withDeleteOrUpdateBehavior(DeleteOrUpdateBehavior deleteOrUpdateBehavior) { - this.deleteOrUpdateBehavior = deleteOrUpdateBehavior; - return this; - } - /** * Validates the instance. * @@ -89,8 +62,6 @@ public void validate() { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeStringField("deleteOrUpdateBehavior", - this.deleteOrUpdateBehavior == null ? null : this.deleteOrUpdateBehavior.toString()); return jsonWriter.writeEndObject(); } @@ -111,9 +82,6 @@ public static VNetSolution fromJson(JsonReader jsonReader) throws IOException { if ("type".equals(fieldName)) { deserializedVNetSolution.type = VNetSolutionType.fromString(reader.getString()); - } else if ("deleteOrUpdateBehavior".equals(fieldName)) { - deserializedVNetSolution.deleteOrUpdateBehavior - = DeleteOrUpdateBehavior.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ValidateOperationResult.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ValidateOperationResult.java index e4635706f4e94..1e38814da8f55 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ValidateOperationResult.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ValidateOperationResult.java @@ -13,7 +13,7 @@ */ public interface ValidateOperationResult { /** - * Gets the resourceId property: Validated Linker id. + * Gets the resourceId property: Validated linker id. * * @return the resourceId value. */ @@ -55,7 +55,7 @@ public interface ValidateOperationResult { OffsetDateTime reportEndTimeUtc(); /** - * Gets the sourceId property: The resource id of the Linker source application. + * Gets the sourceId property: The resource id of the linker source application. * * @return the sourceId value. */ diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ValidationResultItem.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ValidationResultItem.java index 5221aa1208b48..3698b0f5682fd 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ValidationResultItem.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ValidationResultItem.java @@ -12,7 +12,7 @@ import java.io.IOException; /** - * The validation item for a Linker. + * The validation item for a linker. */ @Fluent public final class ValidationResultItem implements JsonSerializable { diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-servicelinker/proxy-config.json b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-servicelinker/proxy-config.json index 7a35b20cd66b1..aad764b06179a 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-servicelinker/proxy-config.json +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-servicelinker/proxy-config.json @@ -1 +1 @@ -[["com.azure.resourcemanager.servicelinker.implementation.ConfigurationNamesOperationsClientImpl$ConfigurationNamesOperationsService"],["com.azure.resourcemanager.servicelinker.implementation.ConnectorsClientImpl$ConnectorsService"],["com.azure.resourcemanager.servicelinker.implementation.LinkersClientImpl$LinkersService"],["com.azure.resourcemanager.servicelinker.implementation.LinkersOperationsClientImpl$LinkersOperationsService"],["com.azure.resourcemanager.servicelinker.implementation.OperationsClientImpl$OperationsService"]] \ No newline at end of file +[["com.azure.resourcemanager.servicelinker.implementation.LinkersClientImpl$LinkersService"],["com.azure.resourcemanager.servicelinker.implementation.OperationsClientImpl$OperationsService"]] \ No newline at end of file diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConfigurationNamesOperationListSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConfigurationNamesOperationListSamples.java deleted file mode 100644 index 6e8b69dd2c9f0..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConfigurationNamesOperationListSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -/** - * Samples for ConfigurationNamesOperation List. - */ -public final class ConfigurationNamesOperationListSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * ConfigurationNamesList.json - */ - /** - * Sample code: GetConfigurationNames. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void getConfigurationNames(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.configurationNamesOperations().list(null, null, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorCreateDryrunSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorCreateDryrunSamples.java deleted file mode 100644 index 014b164cb0932..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorCreateDryrunSamples.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -import com.azure.resourcemanager.servicelinker.models.AzureResource; -import com.azure.resourcemanager.servicelinker.models.CreateOrUpdateDryrunParameters; -import com.azure.resourcemanager.servicelinker.models.SecretAuthInfo; -import com.azure.resourcemanager.servicelinker.models.ValueSecretInfo; - -/** - * Samples for Connector CreateDryrun. - */ -public final class ConnectorCreateDryrunSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * ConnectorDryrunCreate.json - */ - /** - * Sample code: ConnectorDryrunCreate. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void connectorDryrunCreate(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.connectors() - .define("dryrunName") - .withExistingLocation("00000000-0000-0000-0000-000000000000", "test-rg", "westus") - .withParameters(new CreateOrUpdateDryrunParameters().withTargetService(new AzureResource().withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db")) - .withAuthInfo( - new SecretAuthInfo().withName("name").withSecretInfo(new ValueSecretInfo().withValue("secret")))) - .create(); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorCreateOrUpdateSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorCreateOrUpdateSamples.java deleted file mode 100644 index ba48fe80108a1..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorCreateOrUpdateSamples.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -import com.azure.resourcemanager.servicelinker.fluent.models.LinkerResourceInner; -import com.azure.resourcemanager.servicelinker.models.AzureResource; -import com.azure.resourcemanager.servicelinker.models.SecretAuthInfo; -import com.azure.resourcemanager.servicelinker.models.SecretStore; - -/** - * Samples for Connector CreateOrUpdate. - */ -public final class ConnectorCreateOrUpdateSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * PutConnector.json - */ - /** - * Sample code: PutConnector. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void putConnector(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.connectors() - .createOrUpdate("00000000-0000-0000-0000-000000000000", "test-rg", "westus", "connectorName", - new LinkerResourceInner().withTargetService(new AzureResource().withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db")) - .withAuthInfo(new SecretAuthInfo()) - .withSecretStore(new SecretStore().withKeyVaultId("fakeTokenPlaceholder")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorDeleteDryrunSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorDeleteDryrunSamples.java deleted file mode 100644 index fa0e76463a152..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorDeleteDryrunSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -/** - * Samples for Connector DeleteDryrun. - */ -public final class ConnectorDeleteDryrunSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * ConnectorDryrunDelete.json - */ - /** - * Sample code: ConnectorDryrunDelete. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void connectorDryrunDelete(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.connectors() - .deleteDryrunWithResponse("00000000-0000-0000-0000-000000000000", "test-rg", "westus", "dryrunName", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorDeleteSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorDeleteSamples.java deleted file mode 100644 index 0aaf34a7b884e..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorDeleteSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -/** - * Samples for Connector Delete. - */ -public final class ConnectorDeleteSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * DeleteConnector.json - */ - /** - * Sample code: DeleteConnector. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void deleteConnector(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.connectors() - .delete("00000000-0000-0000-0000-000000000000", "test-rg", "westus", "connectorName", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorGenerateConfigurationsSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorGenerateConfigurationsSamples.java deleted file mode 100644 index 2c6685c02773c..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorGenerateConfigurationsSamples.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -import com.azure.resourcemanager.servicelinker.models.ConfigurationInfo; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for Connector GenerateConfigurations. - */ -public final class ConnectorGenerateConfigurationsSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * GenerateConfigurations.json - */ - /** - * Sample code: GenerateConfiguration. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void generateConfiguration(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.connectors() - .generateConfigurationsWithResponse( - "00000000-0000-0000-0000-000000000000", "test-rg", "westus", "connectorName", new ConfigurationInfo() - .withCustomizedKeys(mapOf("ASL_DocumentDb_ConnectionString", "MyConnectionstring")), - com.azure.core.util.Context.NONE); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorGetDryrunSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorGetDryrunSamples.java deleted file mode 100644 index 1e3e774d38f98..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorGetDryrunSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -/** - * Samples for Connector GetDryrun. - */ -public final class ConnectorGetDryrunSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * ConnectorDryrunGet.json - */ - /** - * Sample code: ConnectorDryrunGet. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void connectorDryrunGet(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.connectors() - .getDryrunWithResponse("00000000-0000-0000-0000-000000000000", "test-rg", "westus", "dryrunName", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorGetSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorGetSamples.java deleted file mode 100644 index f1f5987496a24..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -/** - * Samples for Connector Get. - */ -public final class ConnectorGetSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * Connectors.json - */ - /** - * Sample code: Connector. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void connector(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.connectors() - .getWithResponse("00000000-0000-0000-0000-000000000000", "test-rg", "westus", "connectorName", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorListDryrunSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorListDryrunSamples.java deleted file mode 100644 index 05cfd579902f3..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorListDryrunSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -/** - * Samples for Connector ListDryrun. - */ -public final class ConnectorListDryrunSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * ConnectorDryrunList.json - */ - /** - * Sample code: ConnectorDryrunList. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void connectorDryrunList(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.connectors() - .listDryrun("00000000-0000-0000-0000-000000000000", "test-rg", "westus", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorListSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorListSamples.java deleted file mode 100644 index fb90d177f62b5..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -/** - * Samples for Connector List. - */ -public final class ConnectorListSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * ConnectorList.json - */ - /** - * Sample code: ConnectorList. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void connectorList(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.connectors() - .list("00000000-0000-0000-0000-000000000000", "test-rg", "westus", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorUpdateDryrunSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorUpdateDryrunSamples.java deleted file mode 100644 index 88cae3219f358..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorUpdateDryrunSamples.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -import com.azure.resourcemanager.servicelinker.models.AzureResource; -import com.azure.resourcemanager.servicelinker.models.CreateOrUpdateDryrunParameters; -import com.azure.resourcemanager.servicelinker.models.DryrunResource; -import com.azure.resourcemanager.servicelinker.models.SecretAuthInfo; -import com.azure.resourcemanager.servicelinker.models.ValueSecretInfo; - -/** - * Samples for Connector UpdateDryrun. - */ -public final class ConnectorUpdateDryrunSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * ConnectorDryrunUpdate.json - */ - /** - * Sample code: ConnectorDryrunUpdate. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void connectorDryrunUpdate(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - DryrunResource resource = manager.connectors() - .getDryrunWithResponse("00000000-0000-0000-0000-000000000000", "test-rg", "westus", "dryrunName", - com.azure.core.util.Context.NONE) - .getValue(); - resource.update() - .withParameters(new CreateOrUpdateDryrunParameters().withTargetService(new AzureResource().withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db")) - .withAuthInfo( - new SecretAuthInfo().withName("name").withSecretInfo(new ValueSecretInfo().withValue("secret")))) - .apply(); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorUpdateSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorUpdateSamples.java deleted file mode 100644 index 8b3b27c71c3b5..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorUpdateSamples.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -import com.azure.resourcemanager.servicelinker.models.AzureResource; -import com.azure.resourcemanager.servicelinker.models.LinkerPatch; -import com.azure.resourcemanager.servicelinker.models.ServicePrincipalSecretAuthInfo; - -/** - * Samples for Connector Update. - */ -public final class ConnectorUpdateSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * PatchConnector.json - */ - /** - * Sample code: PatchConnector. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void patchConnector(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.connectors() - .update("00000000-0000-0000-0000-000000000000", "test-rg", "westus", "connectorName", - new LinkerPatch().withTargetService(new AzureResource().withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db")) - .withAuthInfo(new ServicePrincipalSecretAuthInfo().withClientId("name") - .withPrincipalId("id") - .withSecret("fakeTokenPlaceholder")), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorValidateSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorValidateSamples.java deleted file mode 100644 index 628c0df619b72..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorValidateSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -/** - * Samples for Connector Validate. - */ -public final class ConnectorValidateSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * ValidateConnectorSuccess.json - */ - /** - * Sample code: ValidateConnectorSuccess. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void validateConnectorSuccess(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.connectors() - .validate("00000000-0000-0000-0000-000000000000", "test-rg", "westus", "connectorName", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkerCreateOrUpdateSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkerCreateOrUpdateSamples.java index 3f239a0c62ed3..cc99dea175e97 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkerCreateOrUpdateSamples.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkerCreateOrUpdateSamples.java @@ -5,7 +5,9 @@ package com.azure.resourcemanager.servicelinker.generated; import com.azure.resourcemanager.servicelinker.models.AzureResource; +import com.azure.resourcemanager.servicelinker.models.KeyVaultSecretUriSecretInfo; import com.azure.resourcemanager.servicelinker.models.SecretAuthInfo; +import com.azure.resourcemanager.servicelinker.models.SecretStore; import com.azure.resourcemanager.servicelinker.models.VNetSolution; import com.azure.resourcemanager.servicelinker.models.VNetSolutionType; import com.azure.resourcemanager.servicelinker.models.ValueSecretInfo; @@ -16,15 +18,61 @@ public final class LinkerCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * PutLinker.json + * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/ + * PutLinkWithSecretStore.json */ /** - * Sample code: PutLinker. + * Sample code: PutLinkWithSecretStore. * * @param manager Entry point to ServiceLinkerManager. */ - public static void putLinker(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { + public static void putLinkWithSecretStore(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { + manager.linkers() + .define("linkName") + .withExistingResourceUri( + "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app") + .withTargetService(new AzureResource().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db")) + .withAuthInfo(new SecretAuthInfo()) + .withSecretStore(new SecretStore().withKeyVaultId("fakeTokenPlaceholder")) + .create(); + } + + /* + * x-ms-original-file: + * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/ + * PutLinkWithServiceEndpoint.json + */ + /** + * Sample code: PutLinkWithServiceEndpoint. + * + * @param manager Entry point to ServiceLinkerManager. + */ + public static void + putLinkWithServiceEndpoint(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { + manager.linkers() + .define("linkName") + .withExistingResourceUri( + "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app") + .withTargetService(new AzureResource().withId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DBforPostgreSQL/servers/test-pg/databases/test-db")) + .withAuthInfo(new SecretAuthInfo().withName("name") + .withSecretInfo(new KeyVaultSecretUriSecretInfo().withValue( + "https://vault-name.vault.azure.net/secrets/secret-name/00000000000000000000000000000000"))) + .withVNetSolution(new VNetSolution().withType(VNetSolutionType.SERVICE_ENDPOINT)) + .create(); + } + + /* + * x-ms-original-file: + * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/PutLink.json + */ + /** + * Sample code: PutLink. + * + * @param manager Entry point to ServiceLinkerManager. + */ + public static void putLink(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { manager.linkers() .define("linkName") .withExistingResourceUri( @@ -33,7 +81,6 @@ public static void putLinker(com.azure.resourcemanager.servicelinker.ServiceLink "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DBforPostgreSQL/servers/test-pg/databases/test-db")) .withAuthInfo( new SecretAuthInfo().withName("name").withSecretInfo(new ValueSecretInfo().withValue("secret"))) - .withVNetSolution(new VNetSolution().withType(VNetSolutionType.SERVICE_ENDPOINT)) .create(); } } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkerDeleteSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkerDeleteSamples.java index 7159636c53b28..1f523e4ca51b5 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkerDeleteSamples.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkerDeleteSamples.java @@ -10,15 +10,14 @@ public final class LinkerDeleteSamples { /* * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * DeleteLinker.json + * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/DeleteLink.json */ /** - * Sample code: DeleteLinker. + * Sample code: DeleteLink. * * @param manager Entry point to ServiceLinkerManager. */ - public static void deleteLinker(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { + public static void deleteLink(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { manager.linkers() .delete( "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkerGetSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkerGetSamples.java index fa03f898d13c8..1c4e2d6a98553 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkerGetSamples.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkerGetSamples.java @@ -10,15 +10,14 @@ public final class LinkerGetSamples { /* * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/Linker. - * json + * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/Link.json */ /** - * Sample code: Linker. + * Sample code: Link. * * @param manager Entry point to ServiceLinkerManager. */ - public static void linker(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { + public static void link(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { manager.linkers() .getWithResponse( "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkerListConfigurationsSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkerListConfigurationsSamples.java index 373c6e4960a62..bb5d2311c925e 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkerListConfigurationsSamples.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkerListConfigurationsSamples.java @@ -10,8 +10,8 @@ public final class LinkerListConfigurationsSamples { /* * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * GetConfigurations.json + * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/GetConfigurations + * .json */ /** * Sample code: GetConfiguration. @@ -21,7 +21,7 @@ public final class LinkerListConfigurationsSamples { public static void getConfiguration(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { manager.linkers() .listConfigurationsWithResponse( - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.App/containerApps/test-app", + "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", "linkName", com.azure.core.util.Context.NONE); } } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkerListSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkerListSamples.java index 1a5cbdcdc957e..fd200733894c0 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkerListSamples.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkerListSamples.java @@ -10,15 +10,14 @@ public final class LinkerListSamples { /* * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * LinkerList.json + * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/LinkList.json */ /** - * Sample code: LinkerList. + * Sample code: LinkList. * * @param manager Entry point to ServiceLinkerManager. */ - public static void linkerList(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { + public static void linkList(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { manager.linkers() .list( "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkerUpdateSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkerUpdateSamples.java index 43d14545d5c00..506b1f6b21ffb 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkerUpdateSamples.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkerUpdateSamples.java @@ -14,15 +14,14 @@ public final class LinkerUpdateSamples { /* * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * PatchLinker.json + * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/PatchLink.json */ /** - * Sample code: PatchLinker. + * Sample code: PatchLink. * * @param manager Entry point to ServiceLinkerManager. */ - public static void patchLinker(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { + public static void patchLink(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { LinkerResource resource = manager.linkers() .getWithResponse( "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkerValidateSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkerValidateSamples.java index 0fd549ce51353..4616198a331ee 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkerValidateSamples.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkerValidateSamples.java @@ -10,15 +10,15 @@ public final class LinkerValidateSamples { /* * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * ValidateLinkerSuccess.json + * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/ + * ValidateLinkSuccess.json */ /** - * Sample code: ValidateLinkerSuccess. + * Sample code: ValidateLinkSuccess. * * @param manager Entry point to ServiceLinkerManager. */ - public static void validateLinkerSuccess(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { + public static void validateLinkSuccess(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { manager.linkers() .validate( "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationCreateDryrunSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationCreateDryrunSamples.java deleted file mode 100644 index f39e3a1417997..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationCreateDryrunSamples.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -import com.azure.resourcemanager.servicelinker.fluent.models.DryrunResourceInner; -import com.azure.resourcemanager.servicelinker.models.AzureResource; -import com.azure.resourcemanager.servicelinker.models.CreateOrUpdateDryrunParameters; -import com.azure.resourcemanager.servicelinker.models.SecretAuthInfo; -import com.azure.resourcemanager.servicelinker.models.ValueSecretInfo; - -/** - * Samples for LinkersOperation CreateDryrun. - */ -public final class LinkersOperationCreateDryrunSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * PutDryrun.json - */ - /** - * Sample code: PutDryrun. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void putDryrun(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.linkersOperations() - .createDryrun( - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", - "dryrunName", - new DryrunResourceInner().withParameters(new CreateOrUpdateDryrunParameters() - .withTargetService(new AzureResource().withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db")) - .withAuthInfo(new SecretAuthInfo().withName("name") - .withSecretInfo(new ValueSecretInfo().withValue("secret")))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationDeleteDryrunSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationDeleteDryrunSamples.java deleted file mode 100644 index abf4aa0bfc7df..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationDeleteDryrunSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -/** - * Samples for LinkersOperation DeleteDryrun. - */ -public final class LinkersOperationDeleteDryrunSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * DeleteDryrun.json - */ - /** - * Sample code: DeleteDryrun. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void deleteDryrun(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.linkersOperations() - .deleteDryrunWithResponse( - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", - "dryrunName", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationGenerateConfigurationsSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationGenerateConfigurationsSamples.java deleted file mode 100644 index 17469615355ba..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationGenerateConfigurationsSamples.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -import com.azure.resourcemanager.servicelinker.models.ConfigurationInfo; -import java.util.HashMap; -import java.util.Map; - -/** - * Samples for LinkersOperation GenerateConfigurations. - */ -public final class LinkersOperationGenerateConfigurationsSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * LinkerGenerateConfigurations.json - */ - /** - * Sample code: GenerateConfiguration. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void generateConfiguration(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.linkersOperations() - .generateConfigurationsWithResponse( - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", - "linkName", new ConfigurationInfo().withCustomizedKeys( - mapOf("ASL_DocumentDb_ConnectionString", "MyConnectionstring")), - com.azure.core.util.Context.NONE); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationGetDryrunSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationGetDryrunSamples.java deleted file mode 100644 index ce156e1752072..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationGetDryrunSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -/** - * Samples for LinkersOperation GetDryrun. - */ -public final class LinkersOperationGetDryrunSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * GetDryrun.json - */ - /** - * Sample code: GetDryrun. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void getDryrun(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.linkersOperations() - .getDryrunWithResponse( - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", - "dryrunName", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationListDaprConfigurationsSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationListDaprConfigurationsSamples.java deleted file mode 100644 index 8ed6658729b38..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationListDaprConfigurationsSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -/** - * Samples for LinkersOperation ListDaprConfigurations. - */ -public final class LinkersOperationListDaprConfigurationsSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * GetDaprConfigurations.json - */ - /** - * Sample code: GetDaprConfigurations. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void getDaprConfigurations(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.linkersOperations() - .listDaprConfigurations( - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationListDryrunSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationListDryrunSamples.java deleted file mode 100644 index b0b97063b411e..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationListDryrunSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -/** - * Samples for LinkersOperation ListDryrun. - */ -public final class LinkersOperationListDryrunSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * ListDryrun.json - */ - /** - * Sample code: ListDryrun. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void listDryrun(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.linkersOperations() - .listDryrun( - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationUpdateDryrunSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationUpdateDryrunSamples.java deleted file mode 100644 index b06dba1c7b35c..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationUpdateDryrunSamples.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -import com.azure.resourcemanager.servicelinker.models.AzureResource; -import com.azure.resourcemanager.servicelinker.models.CreateOrUpdateDryrunParameters; -import com.azure.resourcemanager.servicelinker.models.DryrunPatch; -import com.azure.resourcemanager.servicelinker.models.SecretAuthInfo; -import com.azure.resourcemanager.servicelinker.models.ValueSecretInfo; - -/** - * Samples for LinkersOperation UpdateDryrun. - */ -public final class LinkersOperationUpdateDryrunSamples { - /* - * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * PatchDryrun.json - */ - /** - * Sample code: PatchDryrun. - * - * @param manager Entry point to ServiceLinkerManager. - */ - public static void patchDryrun(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.linkersOperations() - .updateDryrun( - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", - "dryrunName", - new DryrunPatch().withParameters(new CreateOrUpdateDryrunParameters() - .withTargetService(new AzureResource().withId( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db")) - .withAuthInfo(new SecretAuthInfo().withName("name") - .withSecretInfo(new ValueSecretInfo().withValue("secret")))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/OperationsListSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/OperationsListSamples.java index 7b6704a2e7d09..8091c066e9320 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/OperationsListSamples.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/OperationsListSamples.java @@ -10,8 +10,8 @@ public final class OperationsListSamples { /* * x-ms-original-file: - * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2024-07-01-preview/examples/ - * OperationsList.json + * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/OperationsList. + * json */ /** * Sample code: GetConfiguration. diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/AccessKeyInfoBaseTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/AccessKeyInfoBaseTests.java deleted file mode 100644 index b779cab134c95..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/AccessKeyInfoBaseTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.servicelinker.models.AccessKeyInfoBase; -import com.azure.resourcemanager.servicelinker.models.AccessKeyPermissions; -import com.azure.resourcemanager.servicelinker.models.AuthMode; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AccessKeyInfoBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AccessKeyInfoBase model = BinaryData.fromString( - "{\"authType\":\"accessKey\",\"permissions\":[\"Listen\",\"Listen\",\"Manage\",\"Listen\"],\"authMode\":\"optInAllAuth\"}") - .toObject(AccessKeyInfoBase.class); - Assertions.assertEquals(AuthMode.OPT_IN_ALL_AUTH, model.authMode()); - Assertions.assertEquals(AccessKeyPermissions.LISTEN, model.permissions().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AccessKeyInfoBase model = new AccessKeyInfoBase().withAuthMode(AuthMode.OPT_IN_ALL_AUTH) - .withPermissions(Arrays.asList(AccessKeyPermissions.LISTEN, AccessKeyPermissions.LISTEN, - AccessKeyPermissions.MANAGE, AccessKeyPermissions.LISTEN)); - model = BinaryData.fromObject(model).toObject(AccessKeyInfoBase.class); - Assertions.assertEquals(AuthMode.OPT_IN_ALL_AUTH, model.authMode()); - Assertions.assertEquals(AccessKeyPermissions.LISTEN, model.permissions().get(0)); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/AuthInfoBaseTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/AuthInfoBaseTests.java index 1d74b0f67c787..affcd3c37bbe3 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/AuthInfoBaseTests.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/AuthInfoBaseTests.java @@ -6,21 +6,16 @@ import com.azure.core.util.BinaryData; import com.azure.resourcemanager.servicelinker.models.AuthInfoBase; -import com.azure.resourcemanager.servicelinker.models.AuthMode; -import org.junit.jupiter.api.Assertions; public final class AuthInfoBaseTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - AuthInfoBase model = BinaryData.fromString("{\"authType\":\"AuthInfoBase\",\"authMode\":\"optOutAllAuth\"}") - .toObject(AuthInfoBase.class); - Assertions.assertEquals(AuthMode.OPT_OUT_ALL_AUTH, model.authMode()); + AuthInfoBase model = BinaryData.fromString("{\"authType\":\"AuthInfoBase\"}").toObject(AuthInfoBase.class); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AuthInfoBase model = new AuthInfoBase().withAuthMode(AuthMode.OPT_OUT_ALL_AUTH); + AuthInfoBase model = new AuthInfoBase(); model = BinaryData.fromObject(model).toObject(AuthInfoBase.class); - Assertions.assertEquals(AuthMode.OPT_OUT_ALL_AUTH, model.authMode()); } } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/AzureAppConfigPropertiesTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/AzureAppConfigPropertiesTests.java deleted file mode 100644 index 88d3c37fb6fc8..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/AzureAppConfigPropertiesTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.servicelinker.models.AzureAppConfigProperties; -import org.junit.jupiter.api.Assertions; - -public final class AzureAppConfigPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureAppConfigProperties model - = BinaryData.fromString("{\"type\":\"AppConfig\",\"connectWithKubernetesExtension\":false}") - .toObject(AzureAppConfigProperties.class); - Assertions.assertEquals(false, model.connectWithKubernetesExtension()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureAppConfigProperties model = new AzureAppConfigProperties().withConnectWithKubernetesExtension(false); - model = BinaryData.fromObject(model).toObject(AzureAppConfigProperties.class); - Assertions.assertEquals(false, model.connectWithKubernetesExtension()); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/AzureKeyVaultPropertiesTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/AzureKeyVaultPropertiesTests.java index 16beecb879417..d2a6ce1166425 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/AzureKeyVaultPropertiesTests.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/AzureKeyVaultPropertiesTests.java @@ -12,15 +12,15 @@ public final class AzureKeyVaultPropertiesTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureKeyVaultProperties model - = BinaryData.fromString("{\"type\":\"KeyVault\",\"connectAsKubernetesCsiDriver\":false}") + = BinaryData.fromString("{\"type\":\"KeyVault\",\"connectAsKubernetesCsiDriver\":true}") .toObject(AzureKeyVaultProperties.class); - Assertions.assertEquals(false, model.connectAsKubernetesCsiDriver()); + Assertions.assertEquals(true, model.connectAsKubernetesCsiDriver()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - AzureKeyVaultProperties model = new AzureKeyVaultProperties().withConnectAsKubernetesCsiDriver(false); + AzureKeyVaultProperties model = new AzureKeyVaultProperties().withConnectAsKubernetesCsiDriver(true); model = BinaryData.fromObject(model).toObject(AzureKeyVaultProperties.class); - Assertions.assertEquals(false, model.connectAsKubernetesCsiDriver()); + Assertions.assertEquals(true, model.connectAsKubernetesCsiDriver()); } } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/AzureResourceTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/AzureResourceTests.java index 6aca72ec585bc..c28e7b780ab2f 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/AzureResourceTests.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/AzureResourceTests.java @@ -13,16 +13,16 @@ public final class AzureResourceTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { AzureResource model = BinaryData.fromString( - "{\"type\":\"AzureResource\",\"id\":\"zfbuhf\",\"resourceProperties\":{\"type\":\"AzureResourcePropertiesBase\"}}") + "{\"type\":\"AzureResource\",\"id\":\"lngsntnbybkzgcwr\",\"resourceProperties\":{\"type\":\"AzureResourcePropertiesBase\"}}") .toObject(AzureResource.class); - Assertions.assertEquals("zfbuhf", model.id()); + Assertions.assertEquals("lngsntnbybkzgcwr", model.id()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { AzureResource model - = new AzureResource().withId("zfbuhf").withResourceProperties(new AzureResourcePropertiesBase()); + = new AzureResource().withId("lngsntnbybkzgcwr").withResourceProperties(new AzureResourcePropertiesBase()); model = BinaryData.fromObject(model).toObject(AzureResource.class); - Assertions.assertEquals("zfbuhf", model.id()); + Assertions.assertEquals("lngsntnbybkzgcwr", model.id()); } } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConfigurationNameTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConfigurationNameTests.java deleted file mode 100644 index 75a78427579a0..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConfigurationNameTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.servicelinker.models.ConfigurationName; -import org.junit.jupiter.api.Assertions; - -public final class ConfigurationNameTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ConfigurationName model - = BinaryData.fromString("{\"value\":\"scxaq\",\"description\":\"ochcbonqvpkvl\",\"required\":true}") - .toObject(ConfigurationName.class); - Assertions.assertEquals("scxaq", model.value()); - Assertions.assertEquals("ochcbonqvpkvl", model.description()); - Assertions.assertEquals(true, model.required()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ConfigurationName model - = new ConfigurationName().withValue("scxaq").withDescription("ochcbonqvpkvl").withRequired(true); - model = BinaryData.fromObject(model).toObject(ConfigurationName.class); - Assertions.assertEquals("scxaq", model.value()); - Assertions.assertEquals("ochcbonqvpkvl", model.description()); - Assertions.assertEquals(true, model.required()); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConfigurationStoreTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConfigurationStoreTests.java deleted file mode 100644 index 11e83b4b5f516..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConfigurationStoreTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.servicelinker.models.ConfigurationStore; -import org.junit.jupiter.api.Assertions; - -public final class ConfigurationStoreTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ConfigurationStore model - = BinaryData.fromString("{\"appConfigurationId\":\"fiyipjxsqwpgrj\"}").toObject(ConfigurationStore.class); - Assertions.assertEquals("fiyipjxsqwpgrj", model.appConfigurationId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ConfigurationStore model = new ConfigurationStore().withAppConfigurationId("fiyipjxsqwpgrj"); - model = BinaryData.fromObject(model).toObject(ConfigurationStore.class); - Assertions.assertEquals("fiyipjxsqwpgrj", model.appConfigurationId()); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConfluentBootstrapServerTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConfluentBootstrapServerTests.java index c0e7eec611605..a7083ada426d8 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConfluentBootstrapServerTests.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConfluentBootstrapServerTests.java @@ -12,15 +12,15 @@ public final class ConfluentBootstrapServerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ConfluentBootstrapServer model - = BinaryData.fromString("{\"type\":\"ConfluentBootstrapServer\",\"endpoint\":\"nvowgujju\"}") + = BinaryData.fromString("{\"type\":\"ConfluentBootstrapServer\",\"endpoint\":\"ayhuy\"}") .toObject(ConfluentBootstrapServer.class); - Assertions.assertEquals("nvowgujju", model.endpoint()); + Assertions.assertEquals("ayhuy", model.endpoint()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ConfluentBootstrapServer model = new ConfluentBootstrapServer().withEndpoint("nvowgujju"); + ConfluentBootstrapServer model = new ConfluentBootstrapServer().withEndpoint("ayhuy"); model = BinaryData.fromObject(model).toObject(ConfluentBootstrapServer.class); - Assertions.assertEquals("nvowgujju", model.endpoint()); + Assertions.assertEquals("ayhuy", model.endpoint()); } } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConfluentSchemaRegistryTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConfluentSchemaRegistryTests.java index cf191570fe019..711b19e350f06 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConfluentSchemaRegistryTests.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConfluentSchemaRegistryTests.java @@ -12,15 +12,15 @@ public final class ConfluentSchemaRegistryTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ConfluentSchemaRegistry model - = BinaryData.fromString("{\"type\":\"ConfluentSchemaRegistry\",\"endpoint\":\"b\"}") + = BinaryData.fromString("{\"type\":\"ConfluentSchemaRegistry\",\"endpoint\":\"kpode\"}") .toObject(ConfluentSchemaRegistry.class); - Assertions.assertEquals("b", model.endpoint()); + Assertions.assertEquals("kpode", model.endpoint()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ConfluentSchemaRegistry model = new ConfluentSchemaRegistry().withEndpoint("b"); + ConfluentSchemaRegistry model = new ConfluentSchemaRegistry().withEndpoint("kpode"); model = BinaryData.fromObject(model).toObject(ConfluentSchemaRegistry.class); - Assertions.assertEquals("b", model.endpoint()); + Assertions.assertEquals("kpode", model.endpoint()); } } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConnectorsCreateDryrunMockTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConnectorsCreateDryrunMockTests.java deleted file mode 100644 index bffb3a16661f0..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConnectorsCreateDryrunMockTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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.test.http.MockHttpResponse; -import com.azure.resourcemanager.servicelinker.ServiceLinkerManager; -import com.azure.resourcemanager.servicelinker.models.DryrunParameters; -import com.azure.resourcemanager.servicelinker.models.DryrunResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ConnectorsCreateDryrunMockTests { - @Test - public void testCreateDryrun() throws Exception { - String responseStr - = "{\"properties\":{\"parameters\":{\"actionName\":\"DryrunParameters\"},\"prerequisiteResults\":[{\"type\":\"DryrunPrerequisiteResult\"},{\"type\":\"DryrunPrerequisiteResult\"}],\"operationPreviews\":[{\"name\":\"cdytdxw\",\"operationType\":\"configAuth\",\"description\":\"rjaw\",\"action\":\"wgxhn\",\"scope\":\"kxfbkpycgklwndn\"},{\"name\":\"dauwhvylwzbtd\",\"operationType\":\"configAuth\",\"description\":\"znbmpowuwprzq\",\"action\":\"eualupjmkhf\",\"scope\":\"bbcswsrtjri\"},{\"name\":\"rbpbewtghfgblcg\",\"operationType\":\"configNetwork\",\"description\":\"lvqhjkbegibtnmx\",\"action\":\"bwwaloa\",\"scope\":\"cgwrtzjuz\"}],\"provisioningState\":\"Succeeded\"},\"id\":\"xongmtsavjcbpwxq\",\"name\":\"srknftguv\",\"type\":\"iuhprwmdyvxqta\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceLinkerManager manager = ServiceLinkerManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DryrunResource response = manager.connectors() - .define("tcc") - .withExistingLocation("wfqkquj", "dsuyonobgla", "cq") - .withParameters(new DryrunParameters()) - .create(); - - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConnectorsDeleteDryrunWithResponseMockTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConnectorsDeleteDryrunWithResponseMockTests.java deleted file mode 100644 index acb56c95d2583..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConnectorsDeleteDryrunWithResponseMockTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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.test.http.MockHttpResponse; -import com.azure.resourcemanager.servicelinker.ServiceLinkerManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ConnectorsDeleteDryrunWithResponseMockTests { - @Test - public void testDeleteDryrunWithResponse() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceLinkerManager manager = ServiceLinkerManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.connectors() - .deleteDryrunWithResponse("wflzlfbxzpuzy", "ispnqzahmgkbrp", "y", "hibnuqqkpika", - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConnectorsDeleteMockTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConnectorsDeleteMockTests.java deleted file mode 100644 index b6aa15500fa7a..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConnectorsDeleteMockTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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.test.http.MockHttpResponse; -import com.azure.resourcemanager.servicelinker.ServiceLinkerManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ConnectorsDeleteMockTests { - @Test - public void testDelete() throws Exception { - String responseStr = "{}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceLinkerManager manager = ServiceLinkerManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.connectors().delete("ytxhp", "xbzpfzab", "lcuhxwtctyqiklb", "ovplw", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConnectorsGetDryrunWithResponseMockTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConnectorsGetDryrunWithResponseMockTests.java deleted file mode 100644 index 6d7033cc81b4b..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConnectorsGetDryrunWithResponseMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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.test.http.MockHttpResponse; -import com.azure.resourcemanager.servicelinker.ServiceLinkerManager; -import com.azure.resourcemanager.servicelinker.models.DryrunResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ConnectorsGetDryrunWithResponseMockTests { - @Test - public void testGetDryrunWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"parameters\":{\"actionName\":\"DryrunParameters\"},\"prerequisiteResults\":[{\"type\":\"DryrunPrerequisiteResult\"},{\"type\":\"DryrunPrerequisiteResult\"},{\"type\":\"DryrunPrerequisiteResult\"}],\"operationPreviews\":[{\"name\":\"hgyxzkonoc\",\"operationType\":\"configAuth\",\"description\":\"lyaxuc\",\"action\":\"uqszfk\",\"scope\":\"ypewrmjmwvvjekt\"},{\"name\":\"senhwlrs\",\"operationType\":\"configConnection\",\"description\":\"pwvlqdq\",\"action\":\"iqylihkaetck\",\"scope\":\"fcivfsnkym\"},{\"name\":\"tqhjfbebrjcx\",\"operationType\":\"configNetwork\",\"description\":\"wutttxfvjrbi\",\"action\":\"hxepcyvahfnlj\",\"scope\":\"qxj\"},{\"name\":\"ujqgidok\",\"operationType\":\"configNetwork\",\"description\":\"yoxgvcltbgsnc\",\"action\":\"kjeszz\",\"scope\":\"ijhtxf\"}],\"provisioningState\":\"xbf\"},\"id\":\"xnehmpvec\",\"name\":\"godebfqkkrbmpu\",\"type\":\"gr\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceLinkerManager manager = ServiceLinkerManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DryrunResource response = manager.connectors() - .getDryrunWithResponse("iyqzrnk", "qvyxlwhzlsicoho", "qnwvlrya", "w", com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConnectorsListDryrunMockTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConnectorsListDryrunMockTests.java deleted file mode 100644 index 82bc1fe6b1244..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ConnectorsListDryrunMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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.test.http.MockHttpResponse; -import com.azure.resourcemanager.servicelinker.ServiceLinkerManager; -import com.azure.resourcemanager.servicelinker.models.DryrunResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class ConnectorsListDryrunMockTests { - @Test - public void testListDryrun() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"parameters\":{\"actionName\":\"DryrunParameters\"},\"prerequisiteResults\":[{\"type\":\"DryrunPrerequisiteResult\"},{\"type\":\"DryrunPrerequisiteResult\"},{\"type\":\"DryrunPrerequisiteResult\"},{\"type\":\"DryrunPrerequisiteResult\"}],\"operationPreviews\":[{\"name\":\"zsbbzoggigrxwb\",\"operationType\":\"configConnection\",\"description\":\"xxjnspydptk\",\"action\":\"nkoukn\",\"scope\":\"dwtiukbldngkp\"},{\"name\":\"ipazyxoegukgjnpi\",\"operationType\":\"configConnection\",\"description\":\"gevqznty\",\"action\":\"rbpizc\",\"scope\":\"qjsdpydnfyhxdeo\"},{\"name\":\"zi\",\"operationType\":\"configAuth\",\"description\":\"sjttgzfbish\",\"action\":\"khaj\",\"scope\":\"yeamdphagalpb\"}],\"provisioningState\":\"wgipwhono\"},\"id\":\"gshwankixz\",\"name\":\"injep\",\"type\":\"ttmrywnuzoqf\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceLinkerManager manager = ServiceLinkerManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.connectors().listDryrun("faxkffeii", "hl", "m", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/DatabaseAadAuthInfoTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/DatabaseAadAuthInfoTests.java deleted file mode 100644 index e1cec5b88eb6a..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/DatabaseAadAuthInfoTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.servicelinker.models.DatabaseAadAuthInfo; -import org.junit.jupiter.api.Assertions; - -public final class DatabaseAadAuthInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatabaseAadAuthInfo model - = BinaryData.fromString("{\"userName\":\"menevfyexfwh\"}").toObject(DatabaseAadAuthInfo.class); - Assertions.assertEquals("menevfyexfwh", model.username()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatabaseAadAuthInfo model = new DatabaseAadAuthInfo().withUsername("menevfyexfwh"); - model = BinaryData.fromObject(model).toObject(DatabaseAadAuthInfo.class); - Assertions.assertEquals("menevfyexfwh", model.username()); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/DryrunListTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/DryrunListTests.java deleted file mode 100644 index b420309b947a8..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/DryrunListTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.servicelinker.fluent.models.DryrunResourceInner; -import com.azure.resourcemanager.servicelinker.models.DryrunList; -import com.azure.resourcemanager.servicelinker.models.DryrunParameters; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DryrunListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DryrunList model = BinaryData.fromString( - "{\"nextLink\":\"mhquvgjxp\",\"value\":[{\"properties\":{\"parameters\":{\"actionName\":\"DryrunParameters\"},\"prerequisiteResults\":[{\"type\":\"DryrunPrerequisiteResult\"},{\"type\":\"DryrunPrerequisiteResult\"},{\"type\":\"DryrunPrerequisiteResult\"},{\"type\":\"DryrunPrerequisiteResult\"}],\"operationPreviews\":[{\"name\":\"opb\",\"operationType\":\"configNetwork\",\"description\":\"upi\",\"action\":\"sybbejhph\",\"scope\":\"cmsxaobhdxbm\"},{\"name\":\"ioq\",\"operationType\":\"configNetwork\",\"description\":\"tbmufpo\",\"action\":\"oizh\",\"scope\":\"rxybqsoq\"},{\"name\":\"gkdmb\",\"operationType\":\"configConnection\",\"description\":\"obcu\",\"action\":\"dznrbtcqq\",\"scope\":\"qglhq\"},{\"name\":\"ufo\",\"operationType\":\"configConnection\",\"description\":\"wifsq\",\"action\":\"aagdfmg\",\"scope\":\"lhjxr\"}],\"provisioningState\":\"kwm\"},\"id\":\"ktsizntocipaou\",\"name\":\"jpsq\",\"type\":\"cmpoyfdkfogkny\"},{\"properties\":{\"parameters\":{\"actionName\":\"DryrunParameters\"},\"prerequisiteResults\":[{\"type\":\"DryrunPrerequisiteResult\"},{\"type\":\"DryrunPrerequisiteResult\"},{\"type\":\"DryrunPrerequisiteResult\"},{\"type\":\"DryrunPrerequisiteResult\"}],\"operationPreviews\":[{\"name\":\"qs\",\"operationType\":\"configConnection\",\"description\":\"pewnw\",\"action\":\"itjz\",\"scope\":\"lusarh\"},{\"name\":\"fcqhsmyurkd\",\"operationType\":\"configConnection\",\"description\":\"he\",\"action\":\"k\",\"scope\":\"txukcdmp\"},{\"name\":\"cryuan\",\"operationType\":\"configNetwork\",\"description\":\"zdxtayrlhmwhf\",\"action\":\"rqobmtuk\",\"scope\":\"ryrtihfxtijbpzv\"}],\"provisioningState\":\"wzsymglzufcy\"},\"id\":\"ohdbihanufh\",\"name\":\"cbjy\",\"type\":\"a\"},{\"properties\":{\"parameters\":{\"actionName\":\"DryrunParameters\"},\"prerequisiteResults\":[{\"type\":\"DryrunPrerequisiteResult\"},{\"type\":\"DryrunPrerequisiteResult\"}],\"operationPreviews\":[{\"name\":\"bifpikxwczb\",\"operationType\":\"configAuth\",\"description\":\"pqxu\",\"action\":\"vyq\",\"scope\":\"wby\"}],\"provisioningState\":\"k\"},\"id\":\"dumjgrtfwvuk\",\"name\":\"gaudcc\",\"type\":\"nhsjcnyej\"},{\"properties\":{\"parameters\":{\"actionName\":\"DryrunParameters\"},\"prerequisiteResults\":[{\"type\":\"DryrunPrerequisiteResult\"},{\"type\":\"DryrunPrerequisiteResult\"},{\"type\":\"DryrunPrerequisiteResult\"},{\"type\":\"DryrunPrerequisiteResult\"}],\"operationPreviews\":[{\"name\":\"pczwlo\",\"operationType\":\"configNetwork\",\"description\":\"mkkvnip\",\"action\":\"xzjnchgejs\",\"scope\":\"dmailzydehojw\"},{\"name\":\"huxinpmqnj\",\"operationType\":\"configConnection\",\"description\":\"xj\",\"action\":\"r\",\"scope\":\"vcputegj\"},{\"name\":\"mfdatscmdvpj\",\"operationType\":\"configAuth\",\"description\":\"uuvmkjozkrwfnd\",\"action\":\"djpslw\",\"scope\":\"dpvwryoqpsoaccta\"}],\"provisioningState\":\"kljla\"},\"id\":\"cr\",\"name\":\"ffdfdosygexpa\",\"type\":\"jakhmsbzjh\"}]}") - .toObject(DryrunList.class); - Assertions.assertEquals("mhquvgjxp", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DryrunList model = new DryrunList().withNextLink("mhquvgjxp") - .withValue(Arrays.asList(new DryrunResourceInner().withParameters(new DryrunParameters()), - new DryrunResourceInner().withParameters(new DryrunParameters()), - new DryrunResourceInner().withParameters(new DryrunParameters()), - new DryrunResourceInner().withParameters(new DryrunParameters()))); - model = BinaryData.fromObject(model).toObject(DryrunList.class); - Assertions.assertEquals("mhquvgjxp", model.nextLink()); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/DryrunOperationPreviewTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/DryrunOperationPreviewTests.java deleted file mode 100644 index de5479d345b46..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/DryrunOperationPreviewTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.servicelinker.models.DryrunOperationPreview; -import com.azure.resourcemanager.servicelinker.models.DryrunPreviewOperationType; -import org.junit.jupiter.api.Assertions; - -public final class DryrunOperationPreviewTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DryrunOperationPreview model = BinaryData.fromString( - "{\"name\":\"lgphu\",\"operationType\":\"configConnection\",\"description\":\"dvkaozw\",\"action\":\"ftyhxhurokf\",\"scope\":\"xolniwpwcukjfk\"}") - .toObject(DryrunOperationPreview.class); - Assertions.assertEquals("lgphu", model.name()); - Assertions.assertEquals(DryrunPreviewOperationType.CONFIG_CONNECTION, model.operationType()); - Assertions.assertEquals("dvkaozw", model.description()); - Assertions.assertEquals("ftyhxhurokf", model.action()); - Assertions.assertEquals("xolniwpwcukjfk", model.scope()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DryrunOperationPreview model = new DryrunOperationPreview().withName("lgphu") - .withOperationType(DryrunPreviewOperationType.CONFIG_CONNECTION) - .withDescription("dvkaozw") - .withAction("ftyhxhurokf") - .withScope("xolniwpwcukjfk"); - model = BinaryData.fromObject(model).toObject(DryrunOperationPreview.class); - Assertions.assertEquals("lgphu", model.name()); - Assertions.assertEquals(DryrunPreviewOperationType.CONFIG_CONNECTION, model.operationType()); - Assertions.assertEquals("dvkaozw", model.description()); - Assertions.assertEquals("ftyhxhurokf", model.action()); - Assertions.assertEquals("xolniwpwcukjfk", model.scope()); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/DryrunParametersTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/DryrunParametersTests.java deleted file mode 100644 index e884be524c56a..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/DryrunParametersTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.servicelinker.models.DryrunParameters; - -public final class DryrunParametersTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DryrunParameters model - = BinaryData.fromString("{\"actionName\":\"DryrunParameters\"}").toObject(DryrunParameters.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DryrunParameters model = new DryrunParameters(); - model = BinaryData.fromObject(model).toObject(DryrunParameters.class); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/DryrunPatchTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/DryrunPatchTests.java deleted file mode 100644 index bd4f468aea557..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/DryrunPatchTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.servicelinker.models.DryrunParameters; -import com.azure.resourcemanager.servicelinker.models.DryrunPatch; - -public final class DryrunPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DryrunPatch model = BinaryData.fromString( - "{\"properties\":{\"parameters\":{\"actionName\":\"DryrunParameters\"},\"prerequisiteResults\":[{\"type\":\"DryrunPrerequisiteResult\"},{\"type\":\"DryrunPrerequisiteResult\"}],\"operationPreviews\":[{\"name\":\"ypl\",\"operationType\":\"configAuth\",\"description\":\"asy\",\"action\":\"nddhsgcbacph\",\"scope\":\"koty\"},{\"name\":\"gou\",\"operationType\":\"configAuth\",\"description\":\"likwyqkgfgib\",\"action\":\"dgak\",\"scope\":\"s\"},{\"name\":\"yb\",\"operationType\":\"configAuth\",\"description\":\"dqytbciqfouflmm\",\"action\":\"zsm\",\"scope\":\"mglougpbkw\"},{\"name\":\"utduqktapspwgcu\",\"operationType\":\"configConnection\",\"description\":\"mkdo\",\"action\":\"qw\",\"scope\":\"mdgbbjfdd\"}],\"provisioningState\":\"bmbexppbhtqqro\"}}") - .toObject(DryrunPatch.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DryrunPatch model = new DryrunPatch().withParameters(new DryrunParameters()); - model = BinaryData.fromObject(model).toObject(DryrunPatch.class); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/DryrunPrerequisiteResultTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/DryrunPrerequisiteResultTests.java deleted file mode 100644 index e5fc9b0526caf..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/DryrunPrerequisiteResultTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.servicelinker.models.DryrunPrerequisiteResult; - -public final class DryrunPrerequisiteResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DryrunPrerequisiteResult model - = BinaryData.fromString("{\"type\":\"DryrunPrerequisiteResult\"}").toObject(DryrunPrerequisiteResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DryrunPrerequisiteResult model = new DryrunPrerequisiteResult(); - model = BinaryData.fromObject(model).toObject(DryrunPrerequisiteResult.class); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/DryrunPropertiesTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/DryrunPropertiesTests.java deleted file mode 100644 index 53635a6a38c96..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/DryrunPropertiesTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.servicelinker.fluent.models.DryrunProperties; -import com.azure.resourcemanager.servicelinker.models.DryrunParameters; - -public final class DryrunPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DryrunProperties model = BinaryData.fromString( - "{\"parameters\":{\"actionName\":\"DryrunParameters\"},\"prerequisiteResults\":[{\"type\":\"DryrunPrerequisiteResult\"}],\"operationPreviews\":[{\"name\":\"spemvtzfk\",\"operationType\":\"configConnection\",\"description\":\"ljofxqeofjaeqjh\",\"action\":\"b\",\"scope\":\"v\"},{\"name\":\"mjqulngsn\",\"operationType\":\"configConnection\",\"description\":\"bkzgcwrwclx\",\"action\":\"rljdouskcqv\",\"scope\":\"cr\"},{\"name\":\"dkwt\",\"operationType\":\"configAuth\",\"description\":\"njbiksqrglssain\",\"action\":\"jwnzlljfmp\",\"scope\":\"ebvmgxsabkyqd\"},{\"name\":\"jitcjczdzevn\",\"operationType\":\"configConnection\",\"description\":\"wpdappdsbdkv\",\"action\":\"wjfeusnhutjel\",\"scope\":\"rl\"}],\"provisioningState\":\"ugjzzdatqxhocdge\"}") - .toObject(DryrunProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DryrunProperties model = new DryrunProperties().withParameters(new DryrunParameters()); - model = BinaryData.fromObject(model).toObject(DryrunProperties.class); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/DryrunResourceInnerTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/DryrunResourceInnerTests.java deleted file mode 100644 index 82cd26227500a..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/DryrunResourceInnerTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.servicelinker.fluent.models.DryrunResourceInner; -import com.azure.resourcemanager.servicelinker.models.DryrunParameters; - -public final class DryrunResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DryrunResourceInner model = BinaryData.fromString( - "{\"properties\":{\"parameters\":{\"actionName\":\"DryrunParameters\"},\"prerequisiteResults\":[{\"type\":\"DryrunPrerequisiteResult\"},{\"type\":\"DryrunPrerequisiteResult\"},{\"type\":\"DryrunPrerequisiteResult\"},{\"type\":\"DryrunPrerequisiteResult\"}],\"operationPreviews\":[{\"name\":\"lxaolthqtrgqjbp\",\"operationType\":\"configAuth\",\"description\":\"inzgvfcj\",\"action\":\"zoxxjtf\",\"scope\":\"luwfzitonpeqfpjk\"},{\"name\":\"xofpdvhpfxxypi\",\"operationType\":\"configAuth\",\"description\":\"ayhuy\",\"action\":\"kpode\",\"scope\":\"oginuvamiheognar\"}],\"provisioningState\":\"xth\"},\"id\":\"tusivyevcciqihn\",\"name\":\"un\",\"type\":\"bwjzr\"}") - .toObject(DryrunResourceInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DryrunResourceInner model = new DryrunResourceInner().withParameters(new DryrunParameters()); - model = BinaryData.fromObject(model).toObject(DryrunResourceInner.class); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/FabricPlatformTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/FabricPlatformTests.java deleted file mode 100644 index 01993d412eceb..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/FabricPlatformTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.servicelinker.models.FabricPlatform; -import org.junit.jupiter.api.Assertions; - -public final class FabricPlatformTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FabricPlatform model = BinaryData.fromString("{\"type\":\"FabricPlatform\",\"endpoint\":\"dkcglhsl\"}") - .toObject(FabricPlatform.class); - Assertions.assertEquals("dkcglhsl", model.endpoint()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FabricPlatform model = new FabricPlatform().withEndpoint("dkcglhsl"); - model = BinaryData.fromObject(model).toObject(FabricPlatform.class); - Assertions.assertEquals("dkcglhsl", model.endpoint()); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/FirewallRulesTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/FirewallRulesTests.java deleted file mode 100644 index 99c1030c752b3..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/FirewallRulesTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.servicelinker.models.AllowType; -import com.azure.resourcemanager.servicelinker.models.FirewallRules; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FirewallRulesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FirewallRules model = BinaryData.fromString( - "{\"ipRanges\":[\"sdkf\",\"hwxmnteiwa\",\"pvkmijcmmxdcuf\",\"fsrpymzidnse\"],\"azureServices\":\"false\",\"callerClientIP\":\"false\"}") - .toObject(FirewallRules.class); - Assertions.assertEquals("sdkf", model.ipRanges().get(0)); - Assertions.assertEquals(AllowType.FALSE, model.azureServices()); - Assertions.assertEquals(AllowType.FALSE, model.callerClientIp()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FirewallRules model - = new FirewallRules().withIpRanges(Arrays.asList("sdkf", "hwxmnteiwa", "pvkmijcmmxdcuf", "fsrpymzidnse")) - .withAzureServices(AllowType.FALSE) - .withCallerClientIp(AllowType.FALSE); - model = BinaryData.fromObject(model).toObject(FirewallRules.class); - Assertions.assertEquals("sdkf", model.ipRanges().get(0)); - Assertions.assertEquals(AllowType.FALSE, model.azureServices()); - Assertions.assertEquals(AllowType.FALSE, model.callerClientIp()); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/LinkersDeleteMockTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/LinkersDeleteMockTests.java index a632df76a1856..0387d1528cf75 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/LinkersDeleteMockTests.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/LinkersDeleteMockTests.java @@ -27,7 +27,7 @@ public void testDelete() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.linkers().delete("kzbbtd", "umveekgpwozuhkf", com.azure.core.util.Context.NONE); + manager.linkers().delete("mrldhu", "jzzd", com.azure.core.util.Context.NONE); } } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationsDeleteDryrunWithResponseMockTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/LinkersListConfigurationsWithResponseMockTests.java similarity index 56% rename from sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationsDeleteDryrunWithResponseMockTests.java rename to sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/LinkersListConfigurationsWithResponseMockTests.java index e5a4b1ef1ccc9..25f8419b49425 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationsDeleteDryrunWithResponseMockTests.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/LinkersListConfigurationsWithResponseMockTests.java @@ -10,15 +10,18 @@ import com.azure.core.management.profile.AzureProfile; import com.azure.core.test.http.MockHttpResponse; import com.azure.resourcemanager.servicelinker.ServiceLinkerManager; +import com.azure.resourcemanager.servicelinker.models.SourceConfigurationResult; 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 LinkersOperationsDeleteDryrunWithResponseMockTests { +public final class LinkersListConfigurationsWithResponseMockTests { @Test - public void testDeleteDryrunWithResponse() throws Exception { - String responseStr = "{}"; + public void testListConfigurationsWithResponse() throws Exception { + String responseStr + = "{\"configurations\":[{\"name\":\"dqytbciqfouflmm\",\"value\":\"zsm\"},{\"name\":\"mglougpbkw\",\"value\":\"utduqktapspwgcu\"},{\"name\":\"tumkdosvqwhbm\",\"value\":\"bbjfddgmbmbexp\"},{\"name\":\"htqqrolfp\",\"value\":\"s\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); @@ -27,7 +30,11 @@ public void testDeleteDryrunWithResponse() throws Exception { .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), new AzureProfile("", "", AzureEnvironment.AZURE)); - manager.linkersOperations().deleteDryrunWithResponse("pkkpw", "reqnovvqfov", com.azure.core.util.Context.NONE); + SourceConfigurationResult response = manager.linkers() + .listConfigurationsWithResponse("gakeqsr", "yb", com.azure.core.util.Context.NONE) + .getValue(); + Assertions.assertEquals("dqytbciqfouflmm", response.configurations().get(0).name()); + Assertions.assertEquals("zsm", response.configurations().get(0).value()); } } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationsCreateDryrunMockTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationsCreateDryrunMockTests.java deleted file mode 100644 index 5611f45b95e3c..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationsCreateDryrunMockTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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.test.http.MockHttpResponse; -import com.azure.resourcemanager.servicelinker.ServiceLinkerManager; -import com.azure.resourcemanager.servicelinker.fluent.models.DryrunResourceInner; -import com.azure.resourcemanager.servicelinker.models.DryrunParameters; -import com.azure.resourcemanager.servicelinker.models.DryrunResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class LinkersOperationsCreateDryrunMockTests { - @Test - public void testCreateDryrun() throws Exception { - String responseStr - = "{\"properties\":{\"parameters\":{\"actionName\":\"DryrunParameters\"},\"prerequisiteResults\":[{\"type\":\"DryrunPrerequisiteResult\"}],\"operationPreviews\":[{\"name\":\"uwz\",\"operationType\":\"configConnection\",\"description\":\"mpgcjefuzmuvpbt\",\"action\":\"um\",\"scope\":\"p\"},{\"name\":\"ebmnzbtbhjpglk\",\"operationType\":\"configAuth\",\"description\":\"dneu\",\"action\":\"fphsdyhtozfikdow\",\"scope\":\"uuvxz\"},{\"name\":\"lvithhqzonosgg\",\"operationType\":\"configNetwork\",\"description\":\"hfwdsjnkaljutiis\",\"action\":\"cffgdkzzewk\",\"scope\":\"hqcrailvpnpp\"},{\"name\":\"flrwd\",\"operationType\":\"configNetwork\",\"description\":\"xyjrxsagafcnih\",\"action\":\"qapnedgfbcv\",\"scope\":\"vq\"}],\"provisioningState\":\"Succeeded\"},\"id\":\"bobzdopcjwvnhd\",\"name\":\"d\",\"type\":\"mgxcxrslpm\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceLinkerManager manager = ServiceLinkerManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DryrunResource response = manager.linkersOperations() - .createDryrun("dzu", "erscdntne", new DryrunResourceInner().withParameters(new DryrunParameters()), - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationsGetDryrunWithResponseMockTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationsGetDryrunWithResponseMockTests.java deleted file mode 100644 index ce5f4ad8f2f65..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationsGetDryrunWithResponseMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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.test.http.MockHttpResponse; -import com.azure.resourcemanager.servicelinker.ServiceLinkerManager; -import com.azure.resourcemanager.servicelinker.models.DryrunResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class LinkersOperationsGetDryrunWithResponseMockTests { - @Test - public void testGetDryrunWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"parameters\":{\"actionName\":\"DryrunParameters\"},\"prerequisiteResults\":[{\"type\":\"DryrunPrerequisiteResult\"},{\"type\":\"DryrunPrerequisiteResult\"}],\"operationPreviews\":[{\"name\":\"bexilzznfqqnv\",\"operationType\":\"configNetwork\",\"description\":\"taruoujmkcj\",\"action\":\"qytjrybnwjewgd\",\"scope\":\"ervnaenqpehi\"},{\"name\":\"oygmift\",\"operationType\":\"configNetwork\",\"description\":\"ndslgnayqigynduh\",\"action\":\"hqlkthumaqo\",\"scope\":\"gycdu\"},{\"name\":\"r\",\"operationType\":\"configConnection\",\"description\":\"y\",\"action\":\"aolps\",\"scope\":\"qlfmmdnbb\"}],\"provisioningState\":\"zpswiydmc\"},\"id\":\"hzdxssadbzm\",\"name\":\"vdfznudaodvxzb\",\"type\":\"cblylpstdbhhxsr\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceLinkerManager manager = ServiceLinkerManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DryrunResource response = manager.linkersOperations() - .getDryrunWithResponse("sqfsubcgjbirxb", "ybsrfbjfdtwss", com.azure.core.util.Context.NONE) - .getValue(); - - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationsListDryrunMockTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationsListDryrunMockTests.java deleted file mode 100644 index 7b5bf369ee5e2..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationsListDryrunMockTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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.test.http.MockHttpResponse; -import com.azure.resourcemanager.servicelinker.ServiceLinkerManager; -import com.azure.resourcemanager.servicelinker.models.DryrunResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class LinkersOperationsListDryrunMockTests { - @Test - public void testListDryrun() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"parameters\":{\"actionName\":\"DryrunParameters\"},\"prerequisiteResults\":[{\"type\":\"DryrunPrerequisiteResult\"},{\"type\":\"DryrunPrerequisiteResult\"},{\"type\":\"DryrunPrerequisiteResult\"},{\"type\":\"DryrunPrerequisiteResult\"}],\"operationPreviews\":[{\"name\":\"hkxbpv\",\"operationType\":\"configNetwork\",\"description\":\"hx\",\"action\":\"yngudivk\",\"scope\":\"swbxqz\"},{\"name\":\"zjf\",\"operationType\":\"configAuth\",\"description\":\"fdxxivetvtcqaqtd\",\"action\":\"mcbxvwvxysl\",\"scope\":\"hsfxoblytkb\"}],\"provisioningState\":\"pe\"},\"id\":\"wfbkrvrns\",\"name\":\"shqjohxcrsbf\",\"type\":\"vasrruvwb\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceLinkerManager manager = ServiceLinkerManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response - = manager.linkersOperations().listDryrun("grcfb", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationsUpdateDryrunMockTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationsUpdateDryrunMockTests.java deleted file mode 100644 index ea9f341c058ee..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationsUpdateDryrunMockTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.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.test.http.MockHttpResponse; -import com.azure.resourcemanager.servicelinker.ServiceLinkerManager; -import com.azure.resourcemanager.servicelinker.models.DryrunParameters; -import com.azure.resourcemanager.servicelinker.models.DryrunPatch; -import com.azure.resourcemanager.servicelinker.models.DryrunResource; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class LinkersOperationsUpdateDryrunMockTests { - @Test - public void testUpdateDryrun() throws Exception { - String responseStr - = "{\"properties\":{\"parameters\":{\"actionName\":\"DryrunParameters\"},\"prerequisiteResults\":[{\"type\":\"DryrunPrerequisiteResult\"},{\"type\":\"DryrunPrerequisiteResult\"},{\"type\":\"DryrunPrerequisiteResult\"},{\"type\":\"DryrunPrerequisiteResult\"}],\"operationPreviews\":[{\"name\":\"kwofyyvoq\",\"operationType\":\"configConnection\",\"description\":\"expbtg\",\"action\":\"bwoenwashrt\",\"scope\":\"kcnqxwbpo\"},{\"name\":\"lpiujwaa\",\"operationType\":\"configNetwork\",\"description\":\"i\",\"action\":\"byuqerpqlp\",\"scope\":\"cciuqgbdbutau\"}],\"provisioningState\":\"Succeeded\"},\"id\":\"ykojoxafnndlpic\",\"name\":\"koymkcd\",\"type\":\"h\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - ServiceLinkerManager manager = ServiceLinkerManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DryrunResource response = manager.linkersOperations() - .updateDryrun("twuoegrpkhjwni", "qsluicp", new DryrunPatch().withParameters(new DryrunParameters()), - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/OperationDisplayTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/OperationDisplayTests.java index 73d8970e271f7..1960f6e7b601e 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/OperationDisplayTests.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/OperationDisplayTests.java @@ -11,7 +11,7 @@ public final class OperationDisplayTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationDisplay model = BinaryData.fromString( - "{\"provider\":\"rcgyn\",\"resource\":\"cpecfvmmcoofs\",\"operation\":\"zevgb\",\"description\":\"jqabcypmivkwlzuv\"}") + "{\"provider\":\"gvfcj\",\"resource\":\"zoxxjtf\",\"operation\":\"luwfzitonpeqfpjk\",\"description\":\"xofpdvhpfxxypi\"}") .toObject(OperationDisplay.class); } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/OperationInnerTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/OperationInnerTests.java index d6e6a195c6050..2d169bc03e0cb 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/OperationInnerTests.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/OperationInnerTests.java @@ -12,7 +12,7 @@ public final class OperationInnerTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationInner model = BinaryData.fromString( - "{\"name\":\"jybige\",\"isDataAction\":false,\"display\":{\"provider\":\"owskanyktz\",\"resource\":\"u\",\"operation\":\"wgqyw\",\"description\":\"drvyn\"},\"origin\":\"system\",\"actionType\":\"optOut\"}") + "{\"name\":\"ffdfdosygexpa\",\"isDataAction\":true,\"display\":{\"provider\":\"msbzjhcrz\",\"resource\":\"dphlxaolt\",\"operation\":\"trg\",\"description\":\"bpf\"},\"origin\":\"user\",\"actionType\":\"Internal\"}") .toObject(OperationInner.class); } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/OperationListResultTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/OperationListResultTests.java index 0de5b83046827..a62052eae14c9 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/OperationListResultTests.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/OperationListResultTests.java @@ -11,7 +11,7 @@ public final class OperationListResultTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { OperationListResult model = BinaryData.fromString( - "{\"value\":[{\"name\":\"a\",\"isDataAction\":true,\"display\":{\"provider\":\"z\",\"resource\":\"vvtpgvdfgio\",\"operation\":\"ftutqxlngxlefgu\",\"description\":\"xkrxdqmi\"},\"origin\":\"user\",\"actionType\":\"Internal\"}],\"nextLink\":\"vqdra\"}") + "{\"value\":[{\"name\":\"hkryhtn\",\"isDataAction\":true,\"display\":{\"provider\":\"lokjyemkk\",\"resource\":\"ipjoxzjnchgejs\",\"operation\":\"dmailzydehojw\",\"description\":\"huxinpmqnj\"},\"origin\":\"user\",\"actionType\":\"Internal\"},{\"name\":\"sprozvcput\",\"isDataAction\":false,\"display\":{\"provider\":\"mfdatscmdvpj\",\"resource\":\"lsuuvmkjozkrwfnd\",\"operation\":\"djpslw\",\"description\":\"dpvwryoqpsoaccta\"},\"origin\":\"user,system\",\"actionType\":\"Internal\"}],\"nextLink\":\"ahbc\"}") .toObject(OperationListResult.class); } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/OperationsListMockTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/OperationsListMockTests.java index 8af215fe21c37..f7c1a15c0fb2c 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/OperationsListMockTests.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/OperationsListMockTests.java @@ -21,7 +21,7 @@ public final class OperationsListMockTests { @Test public void testList() throws Exception { String responseStr - = "{\"value\":[{\"name\":\"osjswsr\",\"isDataAction\":true,\"display\":{\"provider\":\"rpzbchckqqzqi\",\"resource\":\"iysui\",\"operation\":\"ynkedyatrwyhqmib\",\"description\":\"hwit\"},\"origin\":\"user,system\",\"actionType\":\"optOut\"}]}"; + = "{\"value\":[{\"name\":\"cpr\",\"isDataAction\":false,\"display\":{\"provider\":\"gjvtbv\",\"resource\":\"sszdnru\",\"operation\":\"guhmuouqfpr\",\"description\":\"wbnguitnwui\"},\"origin\":\"user\",\"actionType\":\"Internal\"}]}"; HttpClient httpClient = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/PermissionsMissingDryrunPrerequisiteResultTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/PermissionsMissingDryrunPrerequisiteResultTests.java deleted file mode 100644 index be5b907097c42..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/PermissionsMissingDryrunPrerequisiteResultTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.servicelinker.models.PermissionsMissingDryrunPrerequisiteResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PermissionsMissingDryrunPrerequisiteResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PermissionsMissingDryrunPrerequisiteResult model = BinaryData.fromString( - "{\"type\":\"permissionsMissing\",\"scope\":\"gidyjrrf\",\"permissions\":[\"osvexcsonpclhoc\"],\"recommendedRole\":\"slkevle\"}") - .toObject(PermissionsMissingDryrunPrerequisiteResult.class); - Assertions.assertEquals("gidyjrrf", model.scope()); - Assertions.assertEquals("osvexcsonpclhoc", model.permissions().get(0)); - Assertions.assertEquals("slkevle", model.recommendedRole()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PermissionsMissingDryrunPrerequisiteResult model - = new PermissionsMissingDryrunPrerequisiteResult().withScope("gidyjrrf") - .withPermissions(Arrays.asList("osvexcsonpclhoc")) - .withRecommendedRole("slkevle"); - model = BinaryData.fromObject(model).toObject(PermissionsMissingDryrunPrerequisiteResult.class); - Assertions.assertEquals("gidyjrrf", model.scope()); - Assertions.assertEquals("osvexcsonpclhoc", model.permissions().get(0)); - Assertions.assertEquals("slkevle", model.recommendedRole()); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/PublicNetworkSolutionTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/PublicNetworkSolutionTests.java deleted file mode 100644 index 8556a03adf5e4..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/PublicNetworkSolutionTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.servicelinker.models.ActionType; -import com.azure.resourcemanager.servicelinker.models.AllowType; -import com.azure.resourcemanager.servicelinker.models.DeleteOrUpdateBehavior; -import com.azure.resourcemanager.servicelinker.models.FirewallRules; -import com.azure.resourcemanager.servicelinker.models.PublicNetworkSolution; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PublicNetworkSolutionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PublicNetworkSolution model = BinaryData.fromString( - "{\"deleteOrUpdateBehavior\":\"ForcedCleanup\",\"action\":\"Internal\",\"firewallRules\":{\"ipRanges\":[\"kyfi\",\"rfidfvzwdz\"],\"azureServices\":\"true\",\"callerClientIP\":\"false\"}}") - .toObject(PublicNetworkSolution.class); - Assertions.assertEquals(DeleteOrUpdateBehavior.FORCED_CLEANUP, model.deleteOrUpdateBehavior()); - Assertions.assertEquals(ActionType.INTERNAL, model.action()); - Assertions.assertEquals("kyfi", model.firewallRules().ipRanges().get(0)); - Assertions.assertEquals(AllowType.TRUE, model.firewallRules().azureServices()); - Assertions.assertEquals(AllowType.FALSE, model.firewallRules().callerClientIp()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PublicNetworkSolution model - = new PublicNetworkSolution().withDeleteOrUpdateBehavior(DeleteOrUpdateBehavior.FORCED_CLEANUP) - .withAction(ActionType.INTERNAL) - .withFirewallRules(new FirewallRules().withIpRanges(Arrays.asList("kyfi", "rfidfvzwdz")) - .withAzureServices(AllowType.TRUE) - .withCallerClientIp(AllowType.FALSE)); - model = BinaryData.fromObject(model).toObject(PublicNetworkSolution.class); - Assertions.assertEquals(DeleteOrUpdateBehavior.FORCED_CLEANUP, model.deleteOrUpdateBehavior()); - Assertions.assertEquals(ActionType.INTERNAL, model.action()); - Assertions.assertEquals("kyfi", model.firewallRules().ipRanges().get(0)); - Assertions.assertEquals(AllowType.TRUE, model.firewallRules().azureServices()); - Assertions.assertEquals(AllowType.FALSE, model.firewallRules().callerClientIp()); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/SelfHostedServerTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/SelfHostedServerTests.java deleted file mode 100644 index e86dcbd73a8cd..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/SelfHostedServerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.servicelinker.models.SelfHostedServer; -import org.junit.jupiter.api.Assertions; - -public final class SelfHostedServerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SelfHostedServer model = BinaryData.fromString("{\"type\":\"SelfHostedServer\",\"endpoint\":\"jdyggdtji\"}") - .toObject(SelfHostedServer.class); - Assertions.assertEquals("jdyggdtji", model.endpoint()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SelfHostedServer model = new SelfHostedServer().withEndpoint("jdyggdtji"); - model = BinaryData.fromObject(model).toObject(SelfHostedServer.class); - Assertions.assertEquals("jdyggdtji", model.endpoint()); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ServicePrincipalCertificateAuthInfoTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ServicePrincipalCertificateAuthInfoTests.java index b669772dd2912..3860a107c556e 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ServicePrincipalCertificateAuthInfoTests.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/ServicePrincipalCertificateAuthInfoTests.java @@ -5,41 +5,28 @@ package com.azure.resourcemanager.servicelinker.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.servicelinker.models.AuthMode; -import com.azure.resourcemanager.servicelinker.models.DeleteOrUpdateBehavior; import com.azure.resourcemanager.servicelinker.models.ServicePrincipalCertificateAuthInfo; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class ServicePrincipalCertificateAuthInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { ServicePrincipalCertificateAuthInfo model = BinaryData.fromString( - "{\"authType\":\"servicePrincipalCertificate\",\"clientId\":\"yocf\",\"principalId\":\"fksymddystki\",\"certificate\":\"uxh\",\"deleteOrUpdateBehavior\":\"Default\",\"roles\":[\"o\",\"rq\"],\"authMode\":\"optOutAllAuth\"}") + "{\"authType\":\"servicePrincipalCertificate\",\"clientId\":\"jofxqe\",\"principalId\":\"fjaeq\",\"certificate\":\"hqjbasvmsmj\"}") .toObject(ServicePrincipalCertificateAuthInfo.class); - Assertions.assertEquals(AuthMode.OPT_OUT_ALL_AUTH, model.authMode()); - Assertions.assertEquals("yocf", model.clientId()); - Assertions.assertEquals("fksymddystki", model.principalId()); - Assertions.assertEquals("uxh", model.certificate()); - Assertions.assertEquals(DeleteOrUpdateBehavior.DEFAULT, model.deleteOrUpdateBehavior()); - Assertions.assertEquals("o", model.roles().get(0)); + Assertions.assertEquals("jofxqe", model.clientId()); + Assertions.assertEquals("fjaeq", model.principalId()); + Assertions.assertEquals("hqjbasvmsmj", model.certificate()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - ServicePrincipalCertificateAuthInfo model - = new ServicePrincipalCertificateAuthInfo().withAuthMode(AuthMode.OPT_OUT_ALL_AUTH) - .withClientId("yocf") - .withPrincipalId("fksymddystki") - .withCertificate("uxh") - .withDeleteOrUpdateBehavior(DeleteOrUpdateBehavior.DEFAULT) - .withRoles(Arrays.asList("o", "rq")); + ServicePrincipalCertificateAuthInfo model = new ServicePrincipalCertificateAuthInfo().withClientId("jofxqe") + .withPrincipalId("fjaeq") + .withCertificate("hqjbasvmsmj"); model = BinaryData.fromObject(model).toObject(ServicePrincipalCertificateAuthInfo.class); - Assertions.assertEquals(AuthMode.OPT_OUT_ALL_AUTH, model.authMode()); - Assertions.assertEquals("yocf", model.clientId()); - Assertions.assertEquals("fksymddystki", model.principalId()); - Assertions.assertEquals("uxh", model.certificate()); - Assertions.assertEquals(DeleteOrUpdateBehavior.DEFAULT, model.deleteOrUpdateBehavior()); - Assertions.assertEquals("o", model.roles().get(0)); + Assertions.assertEquals("jofxqe", model.clientId()); + Assertions.assertEquals("fjaeq", model.principalId()); + Assertions.assertEquals("hqjbasvmsmj", model.certificate()); } } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/SourceConfigurationResultInnerTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/SourceConfigurationResultInnerTests.java new file mode 100644 index 0000000000000..eaf4de0539dff --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/SourceConfigurationResultInnerTests.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicelinker.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.servicelinker.fluent.models.SourceConfigurationResultInner; +import com.azure.resourcemanager.servicelinker.models.SourceConfiguration; +import java.util.Arrays; +import org.junit.jupiter.api.Assertions; + +public final class SourceConfigurationResultInnerTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SourceConfigurationResultInner model + = BinaryData.fromString("{\"configurations\":[{\"name\":\"x\",\"value\":\"ivyqniwbybrkxvd\"}]}") + .toObject(SourceConfigurationResultInner.class); + Assertions.assertEquals("x", model.configurations().get(0).name()); + Assertions.assertEquals("ivyqniwbybrkxvd", model.configurations().get(0).value()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SourceConfigurationResultInner model = new SourceConfigurationResultInner() + .withConfigurations(Arrays.asList(new SourceConfiguration().withName("x").withValue("ivyqniwbybrkxvd"))); + model = BinaryData.fromObject(model).toObject(SourceConfigurationResultInner.class); + Assertions.assertEquals("x", model.configurations().get(0).name()); + Assertions.assertEquals("ivyqniwbybrkxvd", model.configurations().get(0).value()); + } +} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/SourceConfigurationTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/SourceConfigurationTests.java new file mode 100644 index 0000000000000..ebab563212d7f --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/SourceConfigurationTests.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.servicelinker.generated; + +import com.azure.core.util.BinaryData; +import com.azure.resourcemanager.servicelinker.models.SourceConfiguration; +import org.junit.jupiter.api.Assertions; + +public final class SourceConfigurationTests { + @org.junit.jupiter.api.Test + public void testDeserialize() throws Exception { + SourceConfiguration model = BinaryData.fromString("{\"name\":\"jgrtfwvukxga\",\"value\":\"ccsnhsjc\"}") + .toObject(SourceConfiguration.class); + Assertions.assertEquals("jgrtfwvukxga", model.name()); + Assertions.assertEquals("ccsnhsjc", model.value()); + } + + @org.junit.jupiter.api.Test + public void testSerialize() throws Exception { + SourceConfiguration model = new SourceConfiguration().withName("jgrtfwvukxga").withValue("ccsnhsjc"); + model = BinaryData.fromObject(model).toObject(SourceConfiguration.class); + Assertions.assertEquals("jgrtfwvukxga", model.name()); + Assertions.assertEquals("ccsnhsjc", model.value()); + } +} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/SystemAssignedIdentityAuthInfoTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/SystemAssignedIdentityAuthInfoTests.java index 66cf5c7be4dc0..e530b1b590bff 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/SystemAssignedIdentityAuthInfoTests.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/SystemAssignedIdentityAuthInfoTests.java @@ -5,35 +5,18 @@ package com.azure.resourcemanager.servicelinker.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.servicelinker.models.AuthMode; -import com.azure.resourcemanager.servicelinker.models.DeleteOrUpdateBehavior; import com.azure.resourcemanager.servicelinker.models.SystemAssignedIdentityAuthInfo; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; public final class SystemAssignedIdentityAuthInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - SystemAssignedIdentityAuthInfo model = BinaryData.fromString( - "{\"authType\":\"systemAssignedIdentity\",\"deleteOrUpdateBehavior\":\"ForcedCleanup\",\"roles\":[\"upfh\",\"hltrpmopjmcmatuo\",\"thfuiuaodsfcpkvx\"],\"userName\":\"puozmyzydag\",\"authMode\":\"optOutAllAuth\"}") + SystemAssignedIdentityAuthInfo model = BinaryData.fromString("{\"authType\":\"systemAssignedIdentity\"}") .toObject(SystemAssignedIdentityAuthInfo.class); - Assertions.assertEquals(AuthMode.OPT_OUT_ALL_AUTH, model.authMode()); - Assertions.assertEquals(DeleteOrUpdateBehavior.FORCED_CLEANUP, model.deleteOrUpdateBehavior()); - Assertions.assertEquals("upfh", model.roles().get(0)); - Assertions.assertEquals("puozmyzydag", model.username()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - SystemAssignedIdentityAuthInfo model - = new SystemAssignedIdentityAuthInfo().withAuthMode(AuthMode.OPT_OUT_ALL_AUTH) - .withDeleteOrUpdateBehavior(DeleteOrUpdateBehavior.FORCED_CLEANUP) - .withRoles(Arrays.asList("upfh", "hltrpmopjmcmatuo", "thfuiuaodsfcpkvx")) - .withUsername("puozmyzydag"); + SystemAssignedIdentityAuthInfo model = new SystemAssignedIdentityAuthInfo(); model = BinaryData.fromObject(model).toObject(SystemAssignedIdentityAuthInfo.class); - Assertions.assertEquals(AuthMode.OPT_OUT_ALL_AUTH, model.authMode()); - Assertions.assertEquals(DeleteOrUpdateBehavior.FORCED_CLEANUP, model.deleteOrUpdateBehavior()); - Assertions.assertEquals("upfh", model.roles().get(0)); - Assertions.assertEquals("puozmyzydag", model.username()); } } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/UserAccountAuthInfoTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/UserAccountAuthInfoTests.java deleted file mode 100644 index 487c60004cb45..0000000000000 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/UserAccountAuthInfoTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.servicelinker.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.servicelinker.models.AuthMode; -import com.azure.resourcemanager.servicelinker.models.DeleteOrUpdateBehavior; -import com.azure.resourcemanager.servicelinker.models.UserAccountAuthInfo; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class UserAccountAuthInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserAccountAuthInfo model = BinaryData.fromString( - "{\"authType\":\"userAccount\",\"principalId\":\"czvyifq\",\"deleteOrUpdateBehavior\":\"Default\",\"roles\":[\"jsllrmv\",\"d\",\"watkpnpulexxb\"],\"userName\":\"wtruwiqzbqjvsovm\",\"authMode\":\"optInAllAuth\"}") - .toObject(UserAccountAuthInfo.class); - Assertions.assertEquals(AuthMode.OPT_IN_ALL_AUTH, model.authMode()); - Assertions.assertEquals("czvyifq", model.principalId()); - Assertions.assertEquals(DeleteOrUpdateBehavior.DEFAULT, model.deleteOrUpdateBehavior()); - Assertions.assertEquals("jsllrmv", model.roles().get(0)); - Assertions.assertEquals("wtruwiqzbqjvsovm", model.username()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserAccountAuthInfo model = new UserAccountAuthInfo().withAuthMode(AuthMode.OPT_IN_ALL_AUTH) - .withPrincipalId("czvyifq") - .withDeleteOrUpdateBehavior(DeleteOrUpdateBehavior.DEFAULT) - .withRoles(Arrays.asList("jsllrmv", "d", "watkpnpulexxb")) - .withUsername("wtruwiqzbqjvsovm"); - model = BinaryData.fromObject(model).toObject(UserAccountAuthInfo.class); - Assertions.assertEquals(AuthMode.OPT_IN_ALL_AUTH, model.authMode()); - Assertions.assertEquals("czvyifq", model.principalId()); - Assertions.assertEquals(DeleteOrUpdateBehavior.DEFAULT, model.deleteOrUpdateBehavior()); - Assertions.assertEquals("jsllrmv", model.roles().get(0)); - Assertions.assertEquals("wtruwiqzbqjvsovm", model.username()); - } -} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/UserAssignedIdentityAuthInfoTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/UserAssignedIdentityAuthInfoTests.java index 6f88a2adb717a..3074a09904440 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/UserAssignedIdentityAuthInfoTests.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/UserAssignedIdentityAuthInfoTests.java @@ -5,40 +5,25 @@ package com.azure.resourcemanager.servicelinker.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.servicelinker.models.AuthMode; -import com.azure.resourcemanager.servicelinker.models.DeleteOrUpdateBehavior; import com.azure.resourcemanager.servicelinker.models.UserAssignedIdentityAuthInfo; -import java.util.Arrays; import org.junit.jupiter.api.Assertions; public final class UserAssignedIdentityAuthInfoTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - UserAssignedIdentityAuthInfo model = BinaryData.fromString( - "{\"authType\":\"userAssignedIdentity\",\"clientId\":\"dectehfiqsc\",\"subscriptionId\":\"ypvhezrkg\",\"deleteOrUpdateBehavior\":\"Default\",\"roles\":[\"efovgmk\",\"sle\",\"yvxyqjp\",\"cattpngjcrcczsq\"],\"userName\":\"hvmdajvnysounq\",\"authMode\":\"optInAllAuth\"}") + UserAssignedIdentityAuthInfo model = BinaryData + .fromString("{\"authType\":\"userAssignedIdentity\",\"clientId\":\"theotusiv\",\"subscriptionId\":\"v\"}") .toObject(UserAssignedIdentityAuthInfo.class); - Assertions.assertEquals(AuthMode.OPT_IN_ALL_AUTH, model.authMode()); - Assertions.assertEquals("dectehfiqsc", model.clientId()); - Assertions.assertEquals("ypvhezrkg", model.subscriptionId()); - Assertions.assertEquals(DeleteOrUpdateBehavior.DEFAULT, model.deleteOrUpdateBehavior()); - Assertions.assertEquals("efovgmk", model.roles().get(0)); - Assertions.assertEquals("hvmdajvnysounq", model.username()); + Assertions.assertEquals("theotusiv", model.clientId()); + Assertions.assertEquals("v", model.subscriptionId()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - UserAssignedIdentityAuthInfo model = new UserAssignedIdentityAuthInfo().withAuthMode(AuthMode.OPT_IN_ALL_AUTH) - .withClientId("dectehfiqsc") - .withSubscriptionId("ypvhezrkg") - .withDeleteOrUpdateBehavior(DeleteOrUpdateBehavior.DEFAULT) - .withRoles(Arrays.asList("efovgmk", "sle", "yvxyqjp", "cattpngjcrcczsq")) - .withUsername("hvmdajvnysounq"); + UserAssignedIdentityAuthInfo model + = new UserAssignedIdentityAuthInfo().withClientId("theotusiv").withSubscriptionId("v"); model = BinaryData.fromObject(model).toObject(UserAssignedIdentityAuthInfo.class); - Assertions.assertEquals(AuthMode.OPT_IN_ALL_AUTH, model.authMode()); - Assertions.assertEquals("dectehfiqsc", model.clientId()); - Assertions.assertEquals("ypvhezrkg", model.subscriptionId()); - Assertions.assertEquals(DeleteOrUpdateBehavior.DEFAULT, model.deleteOrUpdateBehavior()); - Assertions.assertEquals("efovgmk", model.roles().get(0)); - Assertions.assertEquals("hvmdajvnysounq", model.username()); + Assertions.assertEquals("theotusiv", model.clientId()); + Assertions.assertEquals("v", model.subscriptionId()); } } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/VNetSolutionTests.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/VNetSolutionTests.java index 286cb2bf95902..bd3e78fc7d761 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/VNetSolutionTests.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/test/java/com/azure/resourcemanager/servicelinker/generated/VNetSolutionTests.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.servicelinker.generated; import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.servicelinker.models.DeleteOrUpdateBehavior; import com.azure.resourcemanager.servicelinker.models.VNetSolution; import com.azure.resourcemanager.servicelinker.models.VNetSolutionType; import org.junit.jupiter.api.Assertions; @@ -13,19 +12,14 @@ public final class VNetSolutionTests { @org.junit.jupiter.api.Test public void testDeserialize() throws Exception { - VNetSolution model - = BinaryData.fromString("{\"type\":\"serviceEndpoint\",\"deleteOrUpdateBehavior\":\"Default\"}") - .toObject(VNetSolution.class); - Assertions.assertEquals(VNetSolutionType.SERVICE_ENDPOINT, model.type()); - Assertions.assertEquals(DeleteOrUpdateBehavior.DEFAULT, model.deleteOrUpdateBehavior()); + VNetSolution model = BinaryData.fromString("{\"type\":\"privateLink\"}").toObject(VNetSolution.class); + Assertions.assertEquals(VNetSolutionType.PRIVATE_LINK, model.type()); } @org.junit.jupiter.api.Test public void testSerialize() throws Exception { - VNetSolution model = new VNetSolution().withType(VNetSolutionType.SERVICE_ENDPOINT) - .withDeleteOrUpdateBehavior(DeleteOrUpdateBehavior.DEFAULT); + VNetSolution model = new VNetSolution().withType(VNetSolutionType.PRIVATE_LINK); model = BinaryData.fromObject(model).toObject(VNetSolution.class); - Assertions.assertEquals(VNetSolutionType.SERVICE_ENDPOINT, model.type()); - Assertions.assertEquals(DeleteOrUpdateBehavior.DEFAULT, model.deleteOrUpdateBehavior()); + Assertions.assertEquals(VNetSolutionType.PRIVATE_LINK, model.type()); } }