From 38a5f5f79435d5c46dc8ff1dbd4166845456655e Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 26 Jan 2024 07:34:18 +0000 Subject: [PATCH] CodeGen from PR 3178 in test-repo-billy/azure-rest-api-specs Merge a6a9641645aebb119ecfe93a7cd7575e6f51ef40 into 19077176ed509f8139ce021aca5b14b1924a1fd9 --- .../CHANGELOG.md | 4 +- .../README.md | 31 +- .../SAMPLE.md | 700 ++++- .../pom.xml | 11 +- .../servicelinker/ServiceLinkerManager.java | 137 +- .../ConfigurationNamesOperationsClient.java | 42 + .../fluent/ConnectorsClient.java | 627 ++++ .../servicelinker/fluent/LinkersClient.java | 152 +- .../fluent/LinkersOperationsClient.java | 251 ++ .../fluent/OperationsClient.java | 16 +- .../fluent/ServiceLinkerManagementClient.java | 37 +- .../models/ConfigurationNameItemInner.java | 166 + .../fluent/models/ConfigurationNames.java | 169 ++ ...ner.java => ConfigurationResultInner.java} | 22 +- .../fluent/models/DryrunProperties.java | 112 + .../fluent/models/DryrunResourceInner.java | 117 + .../fluent/models/LinkerProperties.java | 102 +- .../fluent/models/LinkerResourceInner.java | 106 +- .../fluent/models/OperationInner.java | 42 +- .../models/ValidateOperationResultInner.java | 64 +- .../fluent/models/ValidateResult.java | 50 +- .../fluent/models/package-info.java | 5 +- .../servicelinker/fluent/package-info.java | 5 +- .../ConfigurationNameItemImpl.java | 59 + ...onfigurationNamesOperationsClientImpl.java | 272 ++ .../ConfigurationNamesOperationsImpl.java | 45 + ...Impl.java => ConfigurationResultImpl.java} | 13 +- .../implementation/ConnectorsClientImpl.java | 2697 +++++++++++++++++ .../implementation/ConnectorsImpl.java | 382 +++ .../implementation/DryrunResourceImpl.java | 164 + .../implementation/LinkerResourceImpl.java | 122 +- .../implementation/LinkersClientImpl.java | 911 +++--- .../implementation/LinkersImpl.java | 178 +- .../LinkersOperationsClientImpl.java | 1078 +++++++ .../implementation/LinkersOperationsImpl.java | 137 + .../implementation/OperationImpl.java | 4 +- .../implementation/OperationsClientImpl.java | 171 +- .../implementation/OperationsImpl.java | 4 +- .../ServiceLinkerManagementClientBuilder.java | 46 +- .../ServiceLinkerManagementClientImpl.java | 144 +- .../servicelinker/implementation/Utils.java | 43 +- .../ValidateOperationResultImpl.java | 3 +- .../implementation/package-info.java | 5 +- .../models/AccessKeyInfoBase.java | 65 + .../models/AccessKeyPermissions.java | 68 + .../servicelinker/models/ActionType.java | 31 +- .../servicelinker/models/AllowType.java | 53 + .../servicelinker/models/AuthInfoBase.java | 17 +- .../servicelinker/models/AuthType.java | 47 +- .../models/AzureKeyVaultProperties.java | 16 +- .../servicelinker/models/AzureResource.java | 20 +- .../models/AzureResourcePropertiesBase.java | 14 +- .../models/AzureResourceType.java | 21 +- .../BasicErrorDryrunPrerequisiteResult.java | 86 + .../servicelinker/models/ClientType.java | 67 +- .../models/ConfigurationInfo.java | 178 ++ .../models/ConfigurationName.java | 106 + .../models/ConfigurationNameItem.java | 55 + .../models/ConfigurationNameResult.java | 74 + .../models/ConfigurationNamesOperations.java | 37 + ...onResult.java => ConfigurationResult.java} | 16 +- .../models/ConfluentBootstrapServer.java | 16 +- .../models/ConfluentSchemaRegistry.java | 16 +- .../servicelinker/models/Connectors.java | 358 +++ .../CreateOrUpdateDryrunParameters.java | 277 ++ .../servicelinker/models/DaprMetadata.java | 106 + .../servicelinker/models/DaprProperties.java | 162 + .../models/DatabaseAadAuthInfo.java | 54 + .../models/DeleteOrUpdateBehavior.java | 53 + .../models/DryrunActionName.java | 48 + .../servicelinker/models/DryrunList.java | 85 + .../models/DryrunOperationPreview.java | 163 + .../models/DryrunParameters.java | 37 + .../servicelinker/models/DryrunPatch.java | 98 + .../models/DryrunPrerequisiteResult.java | 39 + .../models/DryrunPrerequisiteResultType.java | 53 + .../models/DryrunPreviewOperationType.java | 58 + .../servicelinker/models/DryrunResource.java | 212 ++ .../servicelinker/models/FirewallRules.java | 113 + .../KeyVaultSecretReferenceSecretInfo.java | 16 +- .../models/KeyVaultSecretUriSecretInfo.java | 12 +- .../servicelinker/models/LinkerPatch.java | 88 +- .../servicelinker/models/LinkerResource.java | 306 +- .../servicelinker/models/Linkers.java | 134 +- .../models/LinkersOperations.java | 169 ++ .../servicelinker/models/Operation.java | 16 +- .../models/OperationDisplay.java | 36 +- .../models/OperationListResult.java | 16 +- .../servicelinker/models/Operations.java | 16 +- .../servicelinker/models/Origin.java | 30 +- ...ssionsMissingDryrunPrerequisiteResult.java | 113 + .../models/PublicNetworkSolution.java | 116 + .../{LinkerList.java => ResourceList.java} | 36 +- .../servicelinker/models/SecretAuthInfo.java | 20 +- .../servicelinker/models/SecretInfoBase.java | 15 +- .../servicelinker/models/SecretStore.java | 44 +- .../servicelinker/models/SecretType.java | 29 +- .../models/SelfHostedServer.java | 60 + .../ServicePrincipalCertificateAuthInfo.java | 100 +- .../ServicePrincipalSecretAuthInfo.java | 125 +- .../models/SourceConfiguration.java | 20 +- .../SystemAssignedIdentityAuthInfo.java | 98 +- .../models/TargetServiceBase.java | 16 +- .../models/TargetServiceType.java | 34 +- .../models/UserAccountAuthInfo.java | 141 + .../models/UserAssignedIdentityAuthInfo.java | 101 +- .../servicelinker/models/VNetSolution.java | 44 +- .../models/VNetSolutionType.java | 25 +- .../models/ValidateOperationResult.java | 30 +- .../models/ValidationResultItem.java | 32 +- .../models/ValidationResultStatus.java | 29 +- .../servicelinker/models/ValueSecretInfo.java | 16 +- .../servicelinker/models/package-info.java | 5 +- .../servicelinker/package-info.java | 5 +- .../src/main/java/module-info.java | 8 +- .../proxy-config.json | 1 + .../reflect-config.json | 341 +++ ...onfigurationNamesOperationListSamples.java | 24 + .../ConnectorCreateDryrunSamples.java | 35 + .../ConnectorCreateOrUpdateSamples.java | 33 + .../ConnectorDeleteDryrunSamples.java | 25 + .../generated/ConnectorDeleteSamples.java | 25 + ...onnectorGenerateConfigurationsSamples.java | 43 + .../generated/ConnectorGetDryrunSamples.java | 25 + .../generated/ConnectorGetSamples.java | 25 + .../generated/ConnectorListDryrunSamples.java | 25 + .../generated/ConnectorListSamples.java | 25 + .../ConnectorUpdateDryrunSamples.java | 37 + .../generated/ConnectorUpdateSamples.java | 34 + .../generated/ConnectorValidateSamples.java | 25 + .../LinkerCreateOrUpdateSamples.java | 94 +- .../generated/LinkerDeleteSamples.java | 25 +- .../generated/LinkerGetSamples.java | 25 +- .../LinkerListConfigurationsSamples.java | 21 +- .../generated/LinkerListSamples.java | 24 +- .../generated/LinkerUpdateSamples.java | 42 +- .../generated/LinkerValidateSamples.java | 25 +- .../LinkersOperationCreateDryrunSamples.java | 38 + .../LinkersOperationDeleteDryrunSamples.java | 26 + ...perationGenerateConfigurationsSamples.java | 44 + .../LinkersOperationGetDryrunSamples.java | 26 + .../LinkersOperationListDryrunSamples.java | 26 + .../LinkersOperationUpdateDryrunSamples.java | 38 + .../generated/OperationsListSamples.java | 14 +- 144 files changed, 13701 insertions(+), 1956 deletions(-) create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/ConfigurationNamesOperationsClient.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/ConnectorsClient.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/LinkersOperationsClient.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/ConfigurationNameItemInner.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/ConfigurationNames.java rename sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/{SourceConfigurationResultInner.java => ConfigurationResultInner.java} (74%) create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/DryrunProperties.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/DryrunResourceInner.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConfigurationNameItemImpl.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConfigurationNamesOperationsClientImpl.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConfigurationNamesOperationsImpl.java rename sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/{SourceConfigurationResultImpl.java => ConfigurationResultImpl.java} (70%) create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConnectorsClientImpl.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConnectorsImpl.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/DryrunResourceImpl.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/LinkersOperationsClientImpl.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/LinkersOperationsImpl.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AccessKeyInfoBase.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AccessKeyPermissions.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AllowType.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/BasicErrorDryrunPrerequisiteResult.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationInfo.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationName.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationNameItem.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationNameResult.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationNamesOperations.java rename sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/{SourceConfigurationResult.java => ConfigurationResult.java} (62%) create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/Connectors.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/CreateOrUpdateDryrunParameters.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DaprMetadata.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DaprProperties.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DatabaseAadAuthInfo.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DeleteOrUpdateBehavior.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunActionName.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunList.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunOperationPreview.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunParameters.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunPatch.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunPrerequisiteResult.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunPrerequisiteResultType.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunPreviewOperationType.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunResource.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/FirewallRules.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/LinkersOperations.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/PermissionsMissingDryrunPrerequisiteResult.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/PublicNetworkSolution.java rename sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/{LinkerList.java => ResourceList.java} (69%) create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SelfHostedServer.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/UserAccountAuthInfo.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-servicelinker/proxy-config.json create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-servicelinker/reflect-config.json create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConfigurationNamesOperationListSamples.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorCreateDryrunSamples.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorCreateOrUpdateSamples.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorDeleteDryrunSamples.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorDeleteSamples.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorGenerateConfigurationsSamples.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorGetDryrunSamples.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorGetSamples.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorListDryrunSamples.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorListSamples.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorUpdateDryrunSamples.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorUpdateSamples.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorValidateSamples.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationCreateDryrunSamples.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationDeleteDryrunSamples.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationGenerateConfigurationsSamples.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationGetDryrunSamples.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationListDryrunSamples.java create mode 100644 sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationUpdateDryrunSamples.java diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/CHANGELOG.md b/sdk/servicelinker/azure-resourcemanager-servicelinker/CHANGELOG.md index 3bc971f567b44..1ae5095a938f9 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/CHANGELOG.md +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.3 (Unreleased) +## 1.0.0-beta.1 (2024-01-26) + +- Azure Resource Manager ServiceLinker client library for Java. This package contains Microsoft Azure SDK for ServiceLinker Management SDK. Microsoft.ServiceLinker provider test node 20. Package tag package-2022-11-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/README.md b/sdk/servicelinker/azure-resourcemanager-servicelinker/README.md index 886c1e1a11168..5d2ddc8830ed3 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-2022-05-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for ServiceLinker Management SDK. Microsoft.ServiceLinker provider test node 20. Package tag package-2022-11-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-servicelinker - 1.0.0-beta.2 + 1.0.0-beta.3 ``` [//]: # ({x-version-update-end}) @@ -41,19 +41,19 @@ Various documentation is available to help you get started Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client. -[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation. +[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation. ### Authentication -By default, Azure Active Directory token authentication depends on correct configure of following environment variables. +By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. - `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate. -In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`. +In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. -With above configuration, `azure` client can be authenticated by following code: +With above configuration, `azure` client can be authenticated using the following code: ```java AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); @@ -83,20 +83,25 @@ See [API design][design] for general introduction on design and key concepts on ## Contributing -For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md). +For details on contributing to this repository, see the [contributing guide][cg]. -1. Fork it -1. Create your feature branch (`git checkout -b my-new-feature`) -1. Commit your changes (`git commit -am 'Add some feature'`) -1. Push to the branch (`git push origin my-new-feature`) -1. Create new Pull Request +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments. [survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS [docs]: https://azure.github.io/azure-sdk-for-java/ -[jdk]: https://docs.microsoft.com/java/azure/jdk/ +[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/ [azure_subscription]: https://azure.microsoft.com/free/ [azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity [azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty [authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md [design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md +[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fservicelinker%2Fazure-resourcemanager-servicelinker%2FREADME.png) diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/SAMPLE.md b/sdk/servicelinker/azure-resourcemanager-servicelinker/SAMPLE.md index 3f1dc36c95dab..8ff7065236a0d 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/SAMPLE.md +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/SAMPLE.md @@ -1,6 +1,25 @@ # 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) @@ -11,99 +30,353 @@ - [Update](#linker_update) - [Validate](#linker_validate) +## LinkersOperation + +- [CreateDryrun](#linkersoperation_createdryrun) +- [DeleteDryrun](#linkersoperation_deletedryrun) +- [GenerateConfigurations](#linkersoperation_generateconfigurations) +- [GetDryrun](#linkersoperation_getdryrun) +- [ListDryrun](#linkersoperation_listdryrun) +- [UpdateDryrun](#linkersoperation_updatedryrun) + ## Operations - [List](#operations_list) -### Linker_CreateOrUpdate +### ConfigurationNamesOperation_List + +```java +/** + * Samples for ConfigurationNamesOperation List. + */ +public final class ConfigurationNamesOperationListSamples { + /* + * x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2022-11-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/2022-11-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().defineDryrun("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 ```java 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; + +/** + * Samples for Connector CreateOrUpdate. + */ +public final class ConnectorCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2022-11-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().define("connectorName").withExistingLocation("00000000-0000-0000-0000-000000000000", "test-rg", "westus").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(); + } +} +``` + +### Connector_Delete + +```java +/** + * Samples for Connector Delete. + */ +public final class ConnectorDeleteSamples { + /* + * x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2022-11-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/2022-11-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/2022-11-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/2022-11-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/2022-11-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/2022-11-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/2022-11-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.LinkerResource; +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/2022-11-01-preview/examples/PatchConnector.json + */ + /** + * Sample code: PatchConnector. + * + * @param manager Entry point to ServiceLinkerManager. + */ + public static void patchConnector(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { + LinkerResource resource = manager.connectors().getWithResponse("00000000-0000-0000-0000-000000000000", "test-rg", "westus", "connectorName", com.azure.core.util.Context.NONE).getValue(); + resource.update().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")).apply(); + } +} +``` + +### 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.ValueSecretInfo; -/** Samples for Linker CreateOrUpdate. */ -public final class LinkerCreateOrUpdateSamples { +/** + * Samples for Connector UpdateDryrun. + */ +public final class ConnectorUpdateDryrunSamples { /* - * x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/PutLinkWithSecretStore.json + * x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2022-11-01-preview/examples/ConnectorDryrunUpdate.json */ /** - * Sample code: PutLinkWithSecretStore. - * + * Sample code: ConnectorDryrunUpdate. + * * @param manager Entry point to ServiceLinkerManager. */ - 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( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.KeyVault/vaults/test-kv")) - .create(); + 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(); } +} +``` +### Connector_Validate + +```java +/** + * Samples for Connector Validate. + */ +public final class ConnectorValidateSamples { /* - * x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/PutLinkWithServiceEndpoint.json + * x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2022-11-01-preview/examples/ValidateConnectorSuccess.json */ /** - * Sample code: PutLinkWithServiceEndpoint. - * + * Sample code: ValidateConnectorSuccess. + * * @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(); + 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); } +} +``` +### Linker_CreateOrUpdate + +```java +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.ValueSecretInfo; +import com.azure.resourcemanager.servicelinker.models.VNetSolution; +import com.azure.resourcemanager.servicelinker.models.VNetSolutionType; +import java.util.stream.Collectors; + +/** + * Samples for Linker CreateOrUpdate. + */ +public final class LinkerCreateOrUpdateSamples { /* - * x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/PutLink.json + * x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2022-11-01-preview/examples/PutLinker.json */ /** - * Sample code: PutLink. - * + * Sample code: PutLinker. + * * @param manager Entry point to ServiceLinkerManager. */ - public static void putLink(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 ValueSecretInfo().withValue("secret"))) - .create(); + public static void putLinker(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { + manager.linkers().createOrUpdate("subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", "linkName", new LinkerResourceInner().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 ValueSecretInfo().withValue("secret"))).withVNetSolution(new VNetSolution().withType(VNetSolutionType.SERVICE_ENDPOINT)), com.azure.core.util.Context.NONE); } } ``` @@ -111,25 +384,20 @@ public final class LinkerCreateOrUpdateSamples { ### Linker_Delete ```java -import com.azure.core.util.Context; - -/** Samples for Linker Delete. */ +/** + * Samples for Linker Delete. + */ public final class LinkerDeleteSamples { /* - * x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/DeleteLink.json + * x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2022-11-01-preview/examples/DeleteLinker.json */ /** - * Sample code: DeleteLink. - * + * Sample code: DeleteLinker. + * * @param manager Entry point to ServiceLinkerManager. */ - 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", - "linkName", - Context.NONE); + public static void deleteLinker(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { + manager.linkers().delete("subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", "linkName", com.azure.core.util.Context.NONE); } } ``` @@ -137,25 +405,20 @@ public final class LinkerDeleteSamples { ### Linker_Get ```java -import com.azure.core.util.Context; - -/** Samples for Linker Get. */ +/** + * Samples for Linker Get. + */ public final class LinkerGetSamples { /* - * x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/Link.json + * x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2022-11-01-preview/examples/Linker.json */ /** - * Sample code: Link. - * + * Sample code: Linker. + * * @param manager Entry point to ServiceLinkerManager. */ - 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", - "linkName", - Context.NONE); + public static void linker(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { + manager.linkers().getWithResponse("subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", "linkName", com.azure.core.util.Context.NONE); } } ``` @@ -163,24 +426,20 @@ public final class LinkerGetSamples { ### Linker_List ```java -import com.azure.core.util.Context; - -/** Samples for Linker List. */ +/** + * Samples for Linker List. + */ public final class LinkerListSamples { /* - * x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/LinkList.json + * x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2022-11-01-preview/examples/LinkerList.json */ /** - * Sample code: LinkList. - * + * Sample code: LinkerList. + * * @param manager Entry point to ServiceLinkerManager. */ - 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", - Context.NONE); + public static void linkerList(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { + manager.linkers().list("subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", com.azure.core.util.Context.NONE); } } ``` @@ -188,25 +447,20 @@ public final class LinkerListSamples { ### Linker_ListConfigurations ```java -import com.azure.core.util.Context; - -/** Samples for Linker ListConfigurations. */ +/** + * Samples for Linker ListConfigurations. + */ public final class LinkerListConfigurationsSamples { /* - * x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/GetConfigurations.json + * x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2022-11-01-preview/examples/GetConfigurations.json */ /** * Sample code: GetConfiguration. - * + * * @param manager Entry point to ServiceLinkerManager. */ public static void getConfiguration(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager - .linkers() - .listConfigurationsWithResponse( - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", - "linkName", - Context.NONE); + manager.linkers().listConfigurationsWithResponse("subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", "linkName", com.azure.core.util.Context.NONE); } } ``` @@ -214,39 +468,24 @@ public final class LinkerListConfigurationsSamples { ### Linker_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.servicelinker.models.AzureResource; -import com.azure.resourcemanager.servicelinker.models.LinkerResource; +import com.azure.resourcemanager.servicelinker.models.LinkerPatch; import com.azure.resourcemanager.servicelinker.models.ServicePrincipalSecretAuthInfo; -/** Samples for Linker Update. */ +/** + * Samples for Linker Update. + */ public final class LinkerUpdateSamples { /* - * x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/PatchLink.json + * x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2022-11-01-preview/examples/PatchLinker.json */ /** - * Sample code: PatchLink. - * + * Sample code: PatchLinker. + * * @param manager Entry point to ServiceLinkerManager. */ - 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", - "linkName", - Context.NONE) - .getValue(); - resource - .update() - .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("secret")) - .apply(); + public static void patchLinker(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { + manager.linkers().update("subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", "linkName", 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); } } ``` @@ -254,46 +493,195 @@ public final class LinkerUpdateSamples { ### Linker_Validate ```java -import com.azure.core.util.Context; - -/** Samples for Linker Validate. */ +/** + * Samples for Linker Validate. + */ public final class LinkerValidateSamples { /* - * x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/ValidateLinkSuccess.json + * x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2022-11-01-preview/examples/ValidateLinkerSuccess.json */ /** - * Sample code: ValidateLinkSuccess. - * + * Sample code: ValidateLinkerSuccess. + * * @param manager Entry point to ServiceLinkerManager. */ - 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", - "linkName", - Context.NONE); + public static void validateLinkerSuccess(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { + manager.linkers().validate("subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", "linkName", com.azure.core.util.Context.NONE); } } ``` -### Operations_List +### 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/2022-11-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/2022-11-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.core.util.Context; +import com.azure.resourcemanager.servicelinker.models.ConfigurationInfo; +import java.util.HashMap; +import java.util.Map; -/** Samples for Operations List. */ +/** + * Samples for LinkersOperation GenerateConfigurations. + */ +public final class LinkersOperationGenerateConfigurationsSamples { + /* + * x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2022-11-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/2022-11-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_ListDryrun + +```java +/** + * Samples for LinkersOperation ListDryrun. + */ +public final class LinkersOperationListDryrunSamples { + /* + * x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2022-11-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/2022-11-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 +/** + * Samples for Operations List. + */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/OperationsList.json + * x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2022-11-01-preview/examples/OperationsList.json */ /** * Sample code: GetConfiguration. - * + * * @param manager Entry point to ServiceLinkerManager. */ public static void getConfiguration(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.operations().list(Context.NONE); + manager.operations().list(com.azure.core.util.Context.NONE); } } ``` diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/pom.xml b/sdk/servicelinker/azure-resourcemanager-servicelinker/pom.xml index 2b2d285b4c73b..379438d79e37a 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/pom.xml +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/pom.xml @@ -1,3 +1,8 @@ + 4.0.0 @@ -13,7 +18,7 @@ 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-2022-05-01. + 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 test node 20. Package tag package-2022-11-01-preview. https://github.com/Azure/azure-sdk-for-java @@ -38,7 +43,9 @@ UTF-8 - true + 0 + 0 + true 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 d2ca08ad1a68e..05396041d1ccc 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 @@ -24,10 +24,16 @@ 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; @@ -36,28 +42,34 @@ import java.util.Objects; import java.util.stream.Collectors; -/** Entry point to ServiceLinkerManager. Microsoft.ServiceLinker provider. */ +/** + * Entry point to ServiceLinkerManager. + * Microsoft.ServiceLinker provider test node 20. + */ 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) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = - new ServiceLinkerManagementClientBuilder() - .pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); + this.clientObject = new ServiceLinkerManagementClientBuilder().pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()).defaultPollInterval(defaultPollInterval) + .buildClient(); } /** * Creates an instance of ServiceLinker service API entry point. - * + * * @param credential the credential to use. * @param profile the Azure profile for client. * @return the ServiceLinker service API instance. @@ -70,7 +82,7 @@ public static ServiceLinkerManager authenticate(TokenCredential credential, Azur /** * Creates an instance of ServiceLinker service API entry point. - * + * * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. * @param profile the Azure profile for client. * @return the ServiceLinker service API instance. @@ -83,14 +95,16 @@ public static ServiceLinkerManager authenticate(HttpPipeline httpPipeline, Azure /** * Gets a Configurable instance that can be used to create ServiceLinkerManager with optional configuration. - * + * * @return the Configurable instance allowing configurations. */ public static Configurable configure() { return new ServiceLinkerManager.Configurable(); } - /** The Configurable allowing configurations to be set. */ + /** + * The Configurable allowing configurations to be set. + */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); @@ -162,8 +176,8 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { /** * Sets the retry options for the HTTP pipeline retry policy. - * - *

This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + *

+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. * * @param retryOptions the retry options for the HTTP pipeline retry policy. * @return the configurable object itself. @@ -180,8 +194,8 @@ public Configurable withRetryOptions(RetryOptions retryOptions) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = - Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); + this.defaultPollInterval + = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { throw LOGGER .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); @@ -201,21 +215,12 @@ public ServiceLinkerManager authenticate(TokenCredential credential, AzureProfil Objects.requireNonNull(profile, "'profile' cannot be null."); StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder - .append("azsdk-java") - .append("-") - .append("com.azure.resourcemanager.servicelinker") - .append("/") - .append("1.0.0-beta.2"); + userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.servicelinker") + .append("/").append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder - .append(" (") - .append(Configuration.getGlobalConfiguration().get("java.version")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.name")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.version")) - .append("; auto-generated)"); + userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version")) + .append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ") + .append(Configuration.getGlobalConfiguration().get("os.version")).append("; auto-generated)"); } else { userAgentBuilder.append(" (auto-generated)"); } @@ -234,38 +239,37 @@ public ServiceLinkerManager authenticate(TokenCredential credential, AzureProfil policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream().filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY).collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = - new HttpPipelineBuilder() - .httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); + HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) + .policies(policies.toArray(new HttpPipelinePolicy[0])).build(); return new ServiceLinkerManager(httpPipeline, profile, defaultPollInterval); } } /** - * Gets the resource collection API of Linkers. It manages LinkerResource. - * + * Gets the resource collection API of Connectors. It manages DryrunResource, LinkerResource. + * + * @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. + * * @return Resource collection API of Linkers. */ public Linkers linkers() { @@ -275,9 +279,21 @@ 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. - * + * * @return Resource collection API of Operations. */ public Operations operations() { @@ -288,8 +304,23 @@ public Operations operations() { } /** - * @return Wrapped service client ServiceLinkerManagementClient providing direct access to the underlying - * auto-generated API implementation, based on Azure REST API. + * 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. + * + * @return Wrapped service client ServiceLinkerManagementClient. */ public ServiceLinkerManagementClient serviceClient() { return this.clientObject; 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 new file mode 100644 index 0000000000000..31e6122c78a7c --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/ConfigurationNamesOperationsClient.java @@ -0,0 +1,42 @@ +// 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 new file mode 100644 index 0000000000000..585f772814b94 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/ConnectorsClient.java @@ -0,0 +1,627 @@ +// 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 5c11981acda7c..cce268f096297 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,16 +11,19 @@ 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; -/** An instance of this class provides access to all the operations defined in LinkersClient. */ +/** + * An instance of this class provides access to all the operations defined in LinkersClient. + */ public interface LinkersClient { /** - * Returns list of Linkers which connects to the resource. - * + * Returns list of Linkers which connects to the resource. which supports to config both application and target + * service during the resource provision. + * * @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. @@ -31,8 +34,9 @@ public interface LinkersClient { PagedIterable list(String resourceUri); /** - * Returns list of Linkers which connects to the resource. - * + * Returns list of Linkers which connects to the resource. which supports to config both application and target + * service during the resource provision. + * * @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. @@ -45,34 +49,34 @@ public interface LinkersClient { /** * Returns Linker resource for a given name. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker 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. + * @return linker of source and target resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - LinkerResourceInner get(String resourceUri, String linkerName); + Response getWithResponse(String resourceUri, String linkerName, Context context); /** * Returns Linker resource for a given name. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker 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}. + * @return linker of source and target resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceUri, String linkerName, Context context); + 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. * @param parameters Linker details. @@ -82,12 +86,12 @@ public interface LinkersClient { * @return the {@link SyncPoller} for polling of linker of source and target resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LinkerResourceInner> beginCreateOrUpdate( - String resourceUri, String linkerName, LinkerResourceInner parameters); + SyncPoller, LinkerResourceInner> beginCreateOrUpdate(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. * @param parameters Linker details. @@ -98,12 +102,12 @@ SyncPoller, LinkerResourceInner> beginCreateOrUp * @return the {@link SyncPoller} for polling of linker of source and target resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LinkerResourceInner> beginCreateOrUpdate( - String resourceUri, String linkerName, LinkerResourceInner parameters, Context context); + SyncPoller, LinkerResourceInner> beginCreateOrUpdate(String resourceUri, + 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. * @param parameters Linker details. @@ -116,8 +120,8 @@ 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. * @param parameters Linker details. @@ -128,12 +132,12 @@ SyncPoller, LinkerResourceInner> beginCreateOrUp * @return linker of source and target resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - LinkerResourceInner createOrUpdate( - String resourceUri, String linkerName, LinkerResourceInner parameters, Context context); + LinkerResourceInner createOrUpdate(String resourceUri, String linkerName, LinkerResourceInner parameters, + Context context); /** - * Delete a link. - * + * Delete 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. @@ -145,8 +149,8 @@ LinkerResourceInner createOrUpdate( SyncPoller, Void> beginDelete(String resourceUri, String linkerName); /** - * Delete a link. - * + * Delete a Linker. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. * @param context The context to associate with this operation. @@ -159,8 +163,8 @@ LinkerResourceInner createOrUpdate( SyncPoller, Void> beginDelete(String resourceUri, String linkerName, Context context); /** - * Delete a link. - * + * Delete 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. @@ -171,8 +175,8 @@ LinkerResourceInner createOrUpdate( void delete(String resourceUri, String linkerName); /** - * Delete a link. - * + * Delete a Linker. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. * @param context The context to associate with this operation. @@ -184,8 +188,8 @@ LinkerResourceInner createOrUpdate( void delete(String resourceUri, String linkerName, Context context); /** - * Operation to update an existing link. - * + * Operation to update an existing Linker. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. * @param parameters Linker details. @@ -195,12 +199,12 @@ LinkerResourceInner createOrUpdate( * @return the {@link SyncPoller} for polling of linker of source and target resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LinkerResourceInner> beginUpdate( - String resourceUri, String linkerName, LinkerPatch parameters); + SyncPoller, LinkerResourceInner> beginUpdate(String resourceUri, String linkerName, + LinkerPatch parameters); /** - * Operation to update an existing link. - * + * Operation to update an existing Linker. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. * @param parameters Linker details. @@ -211,12 +215,12 @@ SyncPoller, LinkerResourceInner> beginUpdate( * @return the {@link SyncPoller} for polling of linker of source and target resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, LinkerResourceInner> beginUpdate( - String resourceUri, String linkerName, LinkerPatch parameters, Context context); + SyncPoller, LinkerResourceInner> beginUpdate(String resourceUri, String linkerName, + LinkerPatch parameters, Context context); /** - * Operation to update an existing link. - * + * Operation to update an existing Linker. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. * @param parameters Linker details. @@ -229,8 +233,8 @@ SyncPoller, LinkerResourceInner> beginUpdate( LinkerResourceInner update(String resourceUri, String linkerName, LinkerPatch parameters); /** - * Operation to update an existing link. - * + * Operation to update an existing Linker. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. * @param parameters Linker details. @@ -244,87 +248,87 @@ SyncPoller, LinkerResourceInner> beginUpdate( LinkerResourceInner update(String resourceUri, String linkerName, LinkerPatch parameters, Context context); /** - * Validate a link. - * + * Validate 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 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); + SyncPoller, ValidateOperationResultInner> beginValidate(String resourceUri, + String linkerName); /** - * Validate a link. - * + * Validate a Linker. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker 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. + * @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); + SyncPoller, ValidateOperationResultInner> beginValidate(String resourceUri, + String linkerName, Context context); /** - * Validate a link. - * + * Validate 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 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 link. - * + * Validate a Linker. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker 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. + * @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. + * @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. + * @return configurations for source resource, include appSettings, connectionString and serviceBindings along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - SourceConfigurationResultInner listConfigurations(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. - * @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}. + * @return configurations for source resource, include appSettings, connectionString and serviceBindings. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listConfigurationsWithResponse( - String resourceUri, String linkerName, Context context); + ConfigurationResultInner 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 new file mode 100644 index 0000000000000..f8a698d75e10d --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/LinkersOperationsClient.java @@ -0,0 +1,251 @@ +// 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.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); +} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/OperationsClient.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/OperationsClient.java index 3ab76039aba2e..89438c26d05af 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/OperationsClient.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/OperationsClient.java @@ -10,28 +10,30 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.servicelinker.fluent.models.OperationInner; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public interface OperationsClient { /** * Lists the available ServiceLinker REST API operations. - * + * * @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 list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(); /** * Lists the available ServiceLinker REST API operations. - * + * * @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 list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(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 51e97f1c051c0..6fb54e8262e7e 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 @@ -7,47 +7,70 @@ import com.azure.core.http.HttpPipeline; import java.time.Duration; -/** The interface for ServiceLinkerManagementClient class. */ +/** + * The interface for ServiceLinkerManagementClient class. + */ public interface ServiceLinkerManagementClient { /** * Gets server parameter. - * + * * @return the endpoint value. */ String getEndpoint(); /** * Gets Api Version. - * + * * @return the apiVersion value. */ String getApiVersion(); /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ HttpPipeline getHttpPipeline(); /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ Duration getDefaultPollInterval(); + /** + * Gets the ConnectorsClient object to access its operations. + * + * @return the ConnectorsClient object. + */ + ConnectorsClient getConnectors(); + /** * Gets the LinkersClient object to access its operations. - * + * * @return the LinkersClient object. */ 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 new file mode 100644 index 0000000000000..effff16370630 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/ConfigurationNameItemInner.java @@ -0,0 +1,166 @@ +// 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.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.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The ConfigurationNameItem model. + */ +@Fluent +public final class ConfigurationNameItemInner { + /* + * The result detail. + */ + @JsonProperty(value = "properties") + 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 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 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(); + } + } +} 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 new file mode 100644 index 0000000000000..b6613a28d6279 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/ConfigurationNames.java @@ -0,0 +1,169 @@ +// 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.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.fasterxml.jackson.annotation.JsonProperty; +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 { + /* + * The target service provider name and resource name. + */ + @JsonProperty(value = "targetService") + private String targetService; + + /* + * The client type for configuration names. + */ + @JsonProperty(value = "clientType") + private ClientType clientType; + + /* + * The auth type. + */ + @JsonProperty(value = "authType") + private AuthType authType; + + /* + * Indicates some additional properties for dapr client type + */ + @JsonProperty(value = "daprProperties") + private DaprProperties daprProperties; + + /* + * The configuration names to be set in compute service environment. + */ + @JsonProperty(value = "names") + 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 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 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()); + } + } +} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/SourceConfigurationResultInner.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/ConfigurationResultInner.java similarity index 74% rename from sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/SourceConfigurationResultInner.java rename to sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/ConfigurationResultInner.java index aa517497546a6..f92a0962a725c 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/SourceConfigurationResultInner.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/ConfigurationResultInner.java @@ -9,18 +9,26 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Configurations for source resource, include appSettings, connectionString and serviceBindings. */ +/** + * Configurations for source resource, include appSettings, connectionString and serviceBindings. + */ @Fluent -public final class SourceConfigurationResultInner { +public final class ConfigurationResultInner { /* * The configuration properties for source resource. */ @JsonProperty(value = "configurations") private List configurations; + /** + * Creates an instance of ConfigurationResultInner class. + */ + public ConfigurationResultInner() { + } + /** * Get the configurations property: The configuration properties for source resource. - * + * * @return the configurations value. */ public List configurations() { @@ -29,18 +37,18 @@ public List configurations() { /** * Set the configurations property: The configuration properties for source resource. - * + * * @param configurations the configurations value to set. - * @return the SourceConfigurationResultInner object itself. + * @return the ConfigurationResultInner object itself. */ - public SourceConfigurationResultInner withConfigurations(List configurations) { + public ConfigurationResultInner withConfigurations(List configurations) { this.configurations = configurations; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { 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 new file mode 100644 index 0000000000000..fb62a85f6d64a --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/DryrunProperties.java @@ -0,0 +1,112 @@ +// 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.resourcemanager.servicelinker.models.DryrunOperationPreview; +import com.azure.resourcemanager.servicelinker.models.DryrunParameters; +import com.azure.resourcemanager.servicelinker.models.DryrunPrerequisiteResult; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The properties of the dryrun job. + */ +@Fluent +public final class DryrunProperties { + /* + * The parameters of the dryrun + */ + @JsonProperty(value = "parameters") + private DryrunParameters parameters; + + /* + * the result of the dryrun + */ + @JsonProperty(value = "prerequisiteResults", access = JsonProperty.Access.WRITE_ONLY) + private List prerequisiteResults; + + /* + * the preview of the operations for creation + */ + @JsonProperty(value = "operationPreviews", access = JsonProperty.Access.WRITE_ONLY) + private List operationPreviews; + + /* + * The provisioning state. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + 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()); + } + } +} 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 new file mode 100644 index 0000000000000..f76743e37d6b8 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/DryrunResourceInner.java @@ -0,0 +1,117 @@ +// 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.resourcemanager.servicelinker.models.DryrunOperationPreview; +import com.azure.resourcemanager.servicelinker.models.DryrunParameters; +import com.azure.resourcemanager.servicelinker.models.DryrunPrerequisiteResult; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * a dryrun job resource. + */ +@Fluent +public final class DryrunResourceInner extends ProxyResource { + /* + * The properties of the dryrun job. + */ + @JsonProperty(value = "properties") + private DryrunProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * 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 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(); + } + } +} 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 44ef47e9ee44d..64a7a40df9c6c 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 @@ -7,14 +7,18 @@ import com.azure.core.annotation.Fluent; 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 com.fasterxml.jackson.annotation.JsonProperty; -/** The properties of the linker. */ +/** + * The properties of the Linker. + */ @Fluent -public final class LinkerProperties { +public class LinkerProperties { /* * The target service properties */ @@ -57,9 +61,27 @@ public final class LinkerProperties { @JsonProperty(value = "scope") private String scope; + /* + * The network solution. + */ + @JsonProperty(value = "publicNetworkSolution") + private PublicNetworkSolution publicNetworkSolution; + + /* + * The connection information consumed by applications, including secrets, connection strings. + */ + @JsonProperty(value = "configurationInfo") + private ConfigurationInfo configurationInfo; + + /** + * Creates an instance of LinkerProperties class. + */ + public LinkerProperties() { + } + /** * Get the targetService property: The target service properties. - * + * * @return the targetService value. */ public TargetServiceBase targetService() { @@ -68,7 +90,7 @@ public TargetServiceBase targetService() { /** * Set the targetService property: The target service properties. - * + * * @param targetService the targetService value to set. * @return the LinkerProperties object itself. */ @@ -79,7 +101,7 @@ public LinkerProperties withTargetService(TargetServiceBase targetService) { /** * Get the authInfo property: The authentication type. - * + * * @return the authInfo value. */ public AuthInfoBase authInfo() { @@ -88,7 +110,7 @@ public AuthInfoBase authInfo() { /** * Set the authInfo property: The authentication type. - * + * * @param authInfo the authInfo value to set. * @return the LinkerProperties object itself. */ @@ -99,7 +121,7 @@ public LinkerProperties withAuthInfo(AuthInfoBase authInfo) { /** * Get the clientType property: The application client type. - * + * * @return the clientType value. */ public ClientType clientType() { @@ -108,7 +130,7 @@ public ClientType clientType() { /** * Set the clientType property: The application client type. - * + * * @param clientType the clientType value to set. * @return the LinkerProperties object itself. */ @@ -119,7 +141,7 @@ public LinkerProperties withClientType(ClientType clientType) { /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public String provisioningState() { @@ -128,7 +150,7 @@ public String provisioningState() { /** * Get the vNetSolution property: The VNet solution. - * + * * @return the vNetSolution value. */ public VNetSolution vNetSolution() { @@ -137,7 +159,7 @@ public VNetSolution vNetSolution() { /** * Set the vNetSolution property: The VNet solution. - * + * * @param vNetSolution the vNetSolution value to set. * @return the LinkerProperties object itself. */ @@ -148,7 +170,7 @@ public LinkerProperties withVNetSolution(VNetSolution vNetSolution) { /** * Get the secretStore property: An option to store secret value in secure place. - * + * * @return the secretStore value. */ public SecretStore secretStore() { @@ -157,7 +179,7 @@ public SecretStore secretStore() { /** * Set the secretStore property: An option to store secret value in secure place. - * + * * @param secretStore the secretStore value to set. * @return the LinkerProperties object itself. */ @@ -168,7 +190,7 @@ public LinkerProperties withSecretStore(SecretStore secretStore) { /** * Get the scope property: connection scope in source service. - * + * * @return the scope value. */ public String scope() { @@ -177,7 +199,7 @@ public String scope() { /** * Set the scope property: connection scope in source service. - * + * * @param scope the scope value to set. * @return the LinkerProperties object itself. */ @@ -186,9 +208,51 @@ 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. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -204,5 +268,11 @@ public void validate() { if (secretStore() != null) { secretStore().validate(); } + if (publicNetworkSolution() != null) { + publicNetworkSolution().validate(); + } + if (configurationInfo() != null) { + configurationInfo().validate(); + } } } 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 44f17614df63e..192e86313352c 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 @@ -10,29 +10,39 @@ import com.azure.core.util.logging.ClientLogger; 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 com.fasterxml.jackson.annotation.JsonProperty; -/** Linker of source and target resource. */ +/** + * Linker of source and target resource. + */ @Fluent public final class LinkerResourceInner extends ProxyResource { /* - * The properties of the linker. + * The properties of the Linker. */ @JsonProperty(value = "properties", required = true) private LinkerProperties innerProperties = new LinkerProperties(); /* - * The system data. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; /** - * Get the innerProperties property: The properties of the linker. - * + * Creates an instance of LinkerResourceInner class. + */ + public LinkerResourceInner() { + } + + /** + * Get the innerProperties property: The properties of the Linker. + * * @return the innerProperties value. */ private LinkerProperties innerProperties() { @@ -40,8 +50,8 @@ private LinkerProperties innerProperties() { } /** - * Get the systemData property: The system data. - * + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * * @return the systemData value. */ public SystemData systemData() { @@ -50,7 +60,7 @@ public SystemData systemData() { /** * Get the targetService property: The target service properties. - * + * * @return the targetService value. */ public TargetServiceBase targetService() { @@ -59,7 +69,7 @@ public TargetServiceBase targetService() { /** * Set the targetService property: The target service properties. - * + * * @param targetService the targetService value to set. * @return the LinkerResourceInner object itself. */ @@ -73,7 +83,7 @@ public LinkerResourceInner withTargetService(TargetServiceBase targetService) { /** * Get the authInfo property: The authentication type. - * + * * @return the authInfo value. */ public AuthInfoBase authInfo() { @@ -82,7 +92,7 @@ public AuthInfoBase authInfo() { /** * Set the authInfo property: The authentication type. - * + * * @param authInfo the authInfo value to set. * @return the LinkerResourceInner object itself. */ @@ -96,7 +106,7 @@ public LinkerResourceInner withAuthInfo(AuthInfoBase authInfo) { /** * Get the clientType property: The application client type. - * + * * @return the clientType value. */ public ClientType clientType() { @@ -105,7 +115,7 @@ public ClientType clientType() { /** * Set the clientType property: The application client type. - * + * * @param clientType the clientType value to set. * @return the LinkerResourceInner object itself. */ @@ -119,7 +129,7 @@ public LinkerResourceInner withClientType(ClientType clientType) { /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public String provisioningState() { @@ -128,7 +138,7 @@ public String provisioningState() { /** * Get the vNetSolution property: The VNet solution. - * + * * @return the vNetSolution value. */ public VNetSolution vNetSolution() { @@ -137,7 +147,7 @@ public VNetSolution vNetSolution() { /** * Set the vNetSolution property: The VNet solution. - * + * * @param vNetSolution the vNetSolution value to set. * @return the LinkerResourceInner object itself. */ @@ -151,7 +161,7 @@ public LinkerResourceInner withVNetSolution(VNetSolution vNetSolution) { /** * Get the secretStore property: An option to store secret value in secure place. - * + * * @return the secretStore value. */ public SecretStore secretStore() { @@ -160,7 +170,7 @@ public SecretStore secretStore() { /** * Set the secretStore property: An option to store secret value in secure place. - * + * * @param secretStore the secretStore value to set. * @return the LinkerResourceInner object itself. */ @@ -174,7 +184,7 @@ public LinkerResourceInner withSecretStore(SecretStore secretStore) { /** * Get the scope property: connection scope in source service. - * + * * @return the scope value. */ public String scope() { @@ -183,7 +193,7 @@ public String scope() { /** * Set the scope property: connection scope in source service. - * + * * @param scope the scope value to set. * @return the LinkerResourceInner object itself. */ @@ -195,17 +205,63 @@ 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. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (innerProperties() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property innerProperties in model LinkerResourceInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property innerProperties in model LinkerResourceInner")); } else { innerProperties().validate(); } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/OperationInner.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/OperationInner.java index 3d520cb77233f..4282ab9275509 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/OperationInner.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/OperationInner.java @@ -10,20 +10,23 @@ import com.azure.resourcemanager.servicelinker.models.Origin; import com.fasterxml.jackson.annotation.JsonProperty; -/** REST API Operation Details of a REST API operation, returned from the Resource Provider Operations API. */ +/** + * REST API Operation + * + * Details of a REST API operation, returned from the Resource Provider Operations API. + */ @Fluent public final class OperationInner { /* - * The name of the operation, as per Resource-Based Access Control (RBAC). - * Examples: "Microsoft.Compute/virtualMachines/write", - * "Microsoft.Compute/virtualMachines/capture/action" + * The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action" */ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; /* - * Whether the operation applies to data-plane. This is "true" for - * data-plane operations and "false" for ARM/control-plane operations. + * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for + * ARM/control-plane operations. */ @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY) private Boolean isDataAction; @@ -35,23 +38,28 @@ public final class OperationInner { private OperationDisplay display; /* - * The intended executor of the operation; as in Resource Based Access - * Control (RBAC) and audit logs UX. Default value is "user,system" + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default + * value is "user,system" */ @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) private Origin origin; /* - * Enum. Indicates the action type. "Internal" refers to actions that are - * for internal only APIs. + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. */ @JsonProperty(value = "actionType", access = JsonProperty.Access.WRITE_ONLY) private ActionType actionType; + /** + * Creates an instance of OperationInner class. + */ + public OperationInner() { + } + /** * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * + * * @return the name value. */ public String name() { @@ -61,7 +69,7 @@ public String name() { /** * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane * operations and "false" for ARM/control-plane operations. - * + * * @return the isDataAction value. */ public Boolean isDataAction() { @@ -70,7 +78,7 @@ public Boolean isDataAction() { /** * Get the display property: Localized display information for this particular operation. - * + * * @return the display value. */ public OperationDisplay display() { @@ -79,7 +87,7 @@ public OperationDisplay display() { /** * Set the display property: Localized display information for this particular operation. - * + * * @param display the display value to set. * @return the OperationInner object itself. */ @@ -91,7 +99,7 @@ public OperationInner withDisplay(OperationDisplay display) { /** * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and * audit logs UX. Default value is "user,system". - * + * * @return the origin value. */ public Origin origin() { @@ -101,7 +109,7 @@ public Origin origin() { /** * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal * only APIs. - * + * * @return the actionType value. */ public ActionType actionType() { @@ -110,7 +118,7 @@ public ActionType actionType() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { 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 5d622571c49f3..96491c3266164 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 @@ -11,7 +11,9 @@ import java.time.OffsetDateTime; import java.util.List; -/** The validation operation result for a linker. */ +/** + * The validation operation result for a Linker. + */ @Fluent public final class ValidateOperationResultInner { /* @@ -21,7 +23,7 @@ public final class ValidateOperationResultInner { private ValidateResult innerProperties; /* - * Validated linker id. + * Validated Linker id. */ @JsonProperty(value = "resourceId") private String resourceId; @@ -32,9 +34,15 @@ public final class ValidateOperationResultInner { @JsonProperty(value = "status") private String status; + /** + * Creates an instance of ValidateOperationResultInner class. + */ + public ValidateOperationResultInner() { + } + /** * Get the innerProperties property: The validation result detail. - * + * * @return the innerProperties value. */ private ValidateResult innerProperties() { @@ -42,8 +50,8 @@ private ValidateResult innerProperties() { } /** - * Get the resourceId property: Validated linker id. - * + * Get the resourceId property: Validated Linker id. + * * @return the resourceId value. */ public String resourceId() { @@ -51,8 +59,8 @@ public String resourceId() { } /** - * Set the resourceId property: Validated linker id. - * + * Set the resourceId property: Validated Linker id. + * * @param resourceId the resourceId value to set. * @return the ValidateOperationResultInner object itself. */ @@ -63,7 +71,7 @@ public ValidateOperationResultInner withResourceId(String resourceId) { /** * Get the status property: Validation operation status. - * + * * @return the status value. */ public String status() { @@ -72,7 +80,7 @@ public String status() { /** * Set the status property: Validation operation status. - * + * * @param status the status value to set. * @return the ValidateOperationResultInner object itself. */ @@ -83,7 +91,7 @@ public ValidateOperationResultInner withStatus(String status) { /** * Get the linkerName property: The linker name. - * + * * @return the linkerName value. */ public String linkerName() { @@ -92,7 +100,7 @@ public String linkerName() { /** * Set the linkerName property: The linker name. - * + * * @param linkerName the linkerName value to set. * @return the ValidateOperationResultInner object itself. */ @@ -106,7 +114,7 @@ public ValidateOperationResultInner withLinkerName(String linkerName) { /** * Get the isConnectionAvailable property: A boolean value indicating whether the connection is available or not. - * + * * @return the isConnectionAvailable value. */ public Boolean isConnectionAvailable() { @@ -115,7 +123,7 @@ public Boolean isConnectionAvailable() { /** * Set the isConnectionAvailable property: A boolean value indicating whether the connection is available or not. - * + * * @param isConnectionAvailable the isConnectionAvailable value to set. * @return the ValidateOperationResultInner object itself. */ @@ -129,7 +137,7 @@ public ValidateOperationResultInner withIsConnectionAvailable(Boolean isConnecti /** * Get the reportStartTimeUtc property: The start time of the validation report. - * + * * @return the reportStartTimeUtc value. */ public OffsetDateTime reportStartTimeUtc() { @@ -138,7 +146,7 @@ public OffsetDateTime reportStartTimeUtc() { /** * Set the reportStartTimeUtc property: The start time of the validation report. - * + * * @param reportStartTimeUtc the reportStartTimeUtc value to set. * @return the ValidateOperationResultInner object itself. */ @@ -152,7 +160,7 @@ public ValidateOperationResultInner withReportStartTimeUtc(OffsetDateTime report /** * Get the reportEndTimeUtc property: The end time of the validation report. - * + * * @return the reportEndTimeUtc value. */ public OffsetDateTime reportEndTimeUtc() { @@ -161,7 +169,7 @@ public OffsetDateTime reportEndTimeUtc() { /** * Set the reportEndTimeUtc property: The end time of the validation report. - * + * * @param reportEndTimeUtc the reportEndTimeUtc value to set. * @return the ValidateOperationResultInner object itself. */ @@ -174,8 +182,8 @@ public ValidateOperationResultInner withReportEndTimeUtc(OffsetDateTime reportEn } /** - * 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. */ public String sourceId() { @@ -183,8 +191,8 @@ 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 ValidateOperationResultInner object itself. */ @@ -198,7 +206,7 @@ public ValidateOperationResultInner withSourceId(String sourceId) { /** * Get the targetId property: The resource Id of target service. - * + * * @return the targetId value. */ public String targetId() { @@ -207,7 +215,7 @@ public String targetId() { /** * Set the targetId property: The resource Id of target service. - * + * * @param targetId the targetId value to set. * @return the ValidateOperationResultInner object itself. */ @@ -221,7 +229,7 @@ public ValidateOperationResultInner withTargetId(String targetId) { /** * Get the authType property: The authentication type. - * + * * @return the authType value. */ public AuthType authType() { @@ -230,7 +238,7 @@ public AuthType authType() { /** * Set the authType property: The authentication type. - * + * * @param authType the authType value to set. * @return the ValidateOperationResultInner object itself. */ @@ -244,7 +252,7 @@ public ValidateOperationResultInner withAuthType(AuthType authType) { /** * Get the validationDetail property: The detail of validation result. - * + * * @return the validationDetail value. */ public List validationDetail() { @@ -253,7 +261,7 @@ public List validationDetail() { /** * Set the validationDetail property: The detail of validation result. - * + * * @param validationDetail the validationDetail value to set. * @return the ValidateOperationResultInner object itself. */ @@ -267,7 +275,7 @@ public ValidateOperationResultInner withValidationDetail(List validationDetail; + /** + * Creates an instance of ValidateResult class. + */ + public ValidateResult() { + } + /** * Get the linkerName property: The linker name. - * + * * @return the linkerName value. */ public String linkerName() { @@ -73,7 +81,7 @@ public String linkerName() { /** * Set the linkerName property: The linker name. - * + * * @param linkerName the linkerName value to set. * @return the ValidateResult object itself. */ @@ -84,7 +92,7 @@ public ValidateResult withLinkerName(String linkerName) { /** * Get the isConnectionAvailable property: A boolean value indicating whether the connection is available or not. - * + * * @return the isConnectionAvailable value. */ public Boolean isConnectionAvailable() { @@ -93,7 +101,7 @@ public Boolean isConnectionAvailable() { /** * Set the isConnectionAvailable property: A boolean value indicating whether the connection is available or not. - * + * * @param isConnectionAvailable the isConnectionAvailable value to set. * @return the ValidateResult object itself. */ @@ -104,7 +112,7 @@ public ValidateResult withIsConnectionAvailable(Boolean isConnectionAvailable) { /** * Get the reportStartTimeUtc property: The start time of the validation report. - * + * * @return the reportStartTimeUtc value. */ public OffsetDateTime reportStartTimeUtc() { @@ -113,7 +121,7 @@ public OffsetDateTime reportStartTimeUtc() { /** * Set the reportStartTimeUtc property: The start time of the validation report. - * + * * @param reportStartTimeUtc the reportStartTimeUtc value to set. * @return the ValidateResult object itself. */ @@ -124,7 +132,7 @@ public ValidateResult withReportStartTimeUtc(OffsetDateTime reportStartTimeUtc) /** * Get the reportEndTimeUtc property: The end time of the validation report. - * + * * @return the reportEndTimeUtc value. */ public OffsetDateTime reportEndTimeUtc() { @@ -133,7 +141,7 @@ public OffsetDateTime reportEndTimeUtc() { /** * Set the reportEndTimeUtc property: The end time of the validation report. - * + * * @param reportEndTimeUtc the reportEndTimeUtc value to set. * @return the ValidateResult object itself. */ @@ -143,8 +151,8 @@ 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. */ public String sourceId() { @@ -152,8 +160,8 @@ 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. */ @@ -164,7 +172,7 @@ public ValidateResult withSourceId(String sourceId) { /** * Get the targetId property: The resource Id of target service. - * + * * @return the targetId value. */ public String targetId() { @@ -173,7 +181,7 @@ public String targetId() { /** * Set the targetId property: The resource Id of target service. - * + * * @param targetId the targetId value to set. * @return the ValidateResult object itself. */ @@ -184,7 +192,7 @@ public ValidateResult withTargetId(String targetId) { /** * Get the authType property: The authentication type. - * + * * @return the authType value. */ public AuthType authType() { @@ -193,7 +201,7 @@ public AuthType authType() { /** * Set the authType property: The authentication type. - * + * * @param authType the authType value to set. * @return the ValidateResult object itself. */ @@ -204,7 +212,7 @@ public ValidateResult withAuthType(AuthType authType) { /** * Get the validationDetail property: The detail of validation result. - * + * * @return the validationDetail value. */ public List validationDetail() { @@ -213,7 +221,7 @@ public List validationDetail() { /** * Set the validationDetail property: The detail of validation result. - * + * * @param validationDetail the validationDetail value to set. * @return the ValidateResult object itself. */ @@ -224,7 +232,7 @@ public ValidateResult withValidationDetail(List validation /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/package-info.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/package-info.java index 12928aaba7829..edfa25f6c07b2 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/package-info.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the inner data models for ServiceLinkerManagementClient. Microsoft.ServiceLinker provider. */ +/** + * Package containing the inner data models for ServiceLinkerManagementClient. + * Microsoft.ServiceLinker provider test node 20. + */ package com.azure.resourcemanager.servicelinker.fluent.models; diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/package-info.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/package-info.java index 3f6dd75b187a7..20b3343b6cf24 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/package-info.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the service clients for ServiceLinkerManagementClient. Microsoft.ServiceLinker provider. */ +/** + * Package containing the service clients for ServiceLinkerManagementClient. + * Microsoft.ServiceLinker provider test node 20. + */ package com.azure.resourcemanager.servicelinker.fluent; 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 new file mode 100644 index 0000000000000..6ea2cc9b5dea4 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConfigurationNameItemImpl.java @@ -0,0 +1,59 @@ +// 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 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 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 new file mode 100644 index 0000000000000..e9978622a158d --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConfigurationNamesOperationsClientImpl.java @@ -0,0 +1,272 @@ +// 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 + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 + * + * The nextLink parameter. + * @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 new file mode 100644 index 0000000000000..6b1b48e50cc86 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConfigurationNamesOperationsImpl.java @@ -0,0 +1,45 @@ +// 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 Utils.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 Utils.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/SourceConfigurationResultImpl.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConfigurationResultImpl.java similarity index 70% rename from sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/SourceConfigurationResultImpl.java rename to sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConfigurationResultImpl.java index b0ea8b17ee5f7..7ed966817cd3c 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/SourceConfigurationResultImpl.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConfigurationResultImpl.java @@ -4,19 +4,18 @@ package com.azure.resourcemanager.servicelinker.implementation; -import com.azure.resourcemanager.servicelinker.fluent.models.SourceConfigurationResultInner; +import com.azure.resourcemanager.servicelinker.fluent.models.ConfigurationResultInner; +import com.azure.resourcemanager.servicelinker.models.ConfigurationResult; 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 SourceConfigurationResultImpl implements SourceConfigurationResult { - private SourceConfigurationResultInner innerObject; +public final class ConfigurationResultImpl implements ConfigurationResult { + private ConfigurationResultInner innerObject; private final com.azure.resourcemanager.servicelinker.ServiceLinkerManager serviceManager; - SourceConfigurationResultImpl( - SourceConfigurationResultInner innerObject, + ConfigurationResultImpl(ConfigurationResultInner innerObject, com.azure.resourcemanager.servicelinker.ServiceLinkerManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -31,7 +30,7 @@ public List configurations() { } } - public SourceConfigurationResultInner innerModel() { + public ConfigurationResultInner innerModel() { return this.innerObject; } 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 new file mode 100644 index 0000000000000..836233ec113d8 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConnectorsClientImpl.java @@ -0,0 +1,2697 @@ +// 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 + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 + * + * The nextLink parameter. + * @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 + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 + * + * The nextLink parameter. + * @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 new file mode 100644 index 0000000000000..280f9e9580042 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ConnectorsImpl.java @@ -0,0 +1,382 @@ +// 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.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 Utils.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 Utils.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 Utils.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 Utils.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 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 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 = Utils.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 = Utils.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 = Utils.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 = Utils.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 = Utils.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 = Utils.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 = Utils.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 = Utils.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 LinkerResource getById(String id) { + String subscriptionId = Utils.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 = Utils.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 = Utils.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 connectorName = Utils.getValueFromIdByName(id, "connectors"); + if (connectorName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connectors'.", id))); + } + return this.getWithResponse(subscriptionId, resourceGroupName, location, connectorName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String subscriptionId = Utils.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 = Utils.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 = Utils.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 connectorName = Utils.getValueFromIdByName(id, "connectors"); + if (connectorName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connectors'.", id))); + } + return this.getWithResponse(subscriptionId, resourceGroupName, location, connectorName, context); + } + + public void deleteDryrunById(String id) { + String subscriptionId = Utils.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 = Utils.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 = Utils.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 = Utils.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 = Utils.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 = Utils.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 = Utils.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 = Utils.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); + } + + public void deleteById(String id) { + String subscriptionId = Utils.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 = Utils.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 = Utils.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 connectorName = Utils.getValueFromIdByName(id, "connectors"); + if (connectorName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connectors'.", id))); + } + this.delete(subscriptionId, resourceGroupName, location, connectorName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String subscriptionId = Utils.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 = Utils.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 = Utils.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 connectorName = Utils.getValueFromIdByName(id, "connectors"); + if (connectorName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connectors'.", id))); + } + this.delete(subscriptionId, resourceGroupName, location, connectorName, context); + } + + private ConnectorsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager() { + return this.serviceManager; + } + + public DryrunResourceImpl defineDryrun(String name) { + return new DryrunResourceImpl(name, this.manager()); + } + + public LinkerResourceImpl define(String name) { + return new LinkerResourceImpl(name, this.manager()); + } +} 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 new file mode 100644 index 0000000000000..97d87baf254f4 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/DryrunResourceImpl.java @@ -0,0 +1,164 @@ +// 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 = Utils.getValueFromIdByName(innerObject.id(), "subscriptions"); + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourcegroups"); + this.location = Utils.getValueFromIdByName(innerObject.id(), "locations"); + this.dryrunName = Utils.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 c8fff03eab9ad..69c6cada515e2 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,10 +10,12 @@ 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; @@ -67,6 +69,18 @@ public String scope() { return this.innerModel().scope(); } + public PublicNetworkSolution publicNetworkSolution() { + return this.innerModel().publicNetworkSolution(); + } + + public ConfigurationInfo configurationInfo() { + return this.innerModel().configurationInfo(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + public LinkerResourceInner innerModel() { return this.innerObject; } @@ -75,39 +89,39 @@ private com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager() { return this.serviceManager; } - private String resourceUri; + private String subscriptionId; - private String linkerName; + private String resourceGroupName; + + private String location; + + private String connectorName; private LinkerPatch updateParameters; - public LinkerResourceImpl withExistingResourceUri(String resourceUri) { - this.resourceUri = resourceUri; + public LinkerResourceImpl withExistingLocation(String subscriptionId, String resourceGroupName, String location) { + this.subscriptionId = subscriptionId; + this.resourceGroupName = resourceGroupName; + this.location = location; return this; } public LinkerResource create() { - this.innerObject = - serviceManager - .serviceClient() - .getLinkers() - .createOrUpdate(resourceUri, linkerName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getConnectors().createOrUpdate(subscriptionId, + resourceGroupName, location, connectorName, this.innerModel(), Context.NONE); return this; } public LinkerResource create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getLinkers() - .createOrUpdate(resourceUri, linkerName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getConnectors().createOrUpdate(subscriptionId, + resourceGroupName, location, connectorName, this.innerModel(), context); return this; } LinkerResourceImpl(String name, com.azure.resourcemanager.servicelinker.ServiceLinkerManager serviceManager) { this.innerObject = new LinkerResourceInner(); this.serviceManager = serviceManager; - this.linkerName = name; + this.connectorName = name; } public LinkerResourceImpl update() { @@ -116,65 +130,57 @@ public LinkerResourceImpl update() { } public LinkerResource apply() { - this.innerObject = - serviceManager.serviceClient().getLinkers().update(resourceUri, linkerName, updateParameters, Context.NONE); + this.innerObject = serviceManager.serviceClient().getConnectors().update(subscriptionId, resourceGroupName, + location, connectorName, updateParameters, Context.NONE); return this; } public LinkerResource apply(Context context) { - this.innerObject = - serviceManager.serviceClient().getLinkers().update(resourceUri, linkerName, updateParameters, context); + this.innerObject = serviceManager.serviceClient().getConnectors().update(subscriptionId, resourceGroupName, + location, connectorName, updateParameters, context); return this; } - LinkerResourceImpl( - LinkerResourceInner innerObject, com.azure.resourcemanager.servicelinker.ServiceLinkerManager serviceManager) { + LinkerResourceImpl(LinkerResourceInner innerObject, + com.azure.resourcemanager.servicelinker.ServiceLinkerManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceUri = - Utils - .getValueFromIdByParameterName( - innerObject.id(), - "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}", - "resourceUri"); - this.linkerName = - Utils - .getValueFromIdByParameterName( - innerObject.id(), - "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}", - "linkerName"); + this.subscriptionId = Utils.getValueFromIdByName(innerObject.id(), "subscriptions"); + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourcegroups"); + this.location = Utils.getValueFromIdByName(innerObject.id(), "locations"); + this.connectorName = Utils.getValueFromIdByName(innerObject.id(), "connectors"); } public LinkerResource refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getLinkers() - .getWithResponse(resourceUri, linkerName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getConnectors() + .getWithResponse(subscriptionId, resourceGroupName, location, connectorName, Context.NONE).getValue(); return this; } public LinkerResource refresh(Context context) { - this.innerObject = - serviceManager.serviceClient().getLinkers().getWithResponse(resourceUri, linkerName, context).getValue(); + this.innerObject = serviceManager.serviceClient().getConnectors() + .getWithResponse(subscriptionId, resourceGroupName, location, connectorName, context).getValue(); return this; } public ValidateOperationResult validate() { - return serviceManager.linkers().validate(resourceUri, linkerName); + return serviceManager.connectors().validate(subscriptionId, resourceGroupName, location, connectorName); } public ValidateOperationResult validate(Context context) { - return serviceManager.linkers().validate(resourceUri, linkerName, context); + return serviceManager.connectors().validate(subscriptionId, resourceGroupName, location, connectorName, + context); } - public SourceConfigurationResult listConfigurations() { - return serviceManager.linkers().listConfigurations(resourceUri, linkerName); + public Response generateConfigurationsWithResponse(ConfigurationInfo parameters, + Context context) { + return serviceManager.connectors().generateConfigurationsWithResponse(subscriptionId, resourceGroupName, + location, connectorName, parameters, context); } - public Response listConfigurationsWithResponse(Context context) { - return serviceManager.linkers().listConfigurationsWithResponse(resourceUri, linkerName, context); + public ConfigurationResult generateConfigurations() { + return serviceManager.connectors().generateConfigurations(subscriptionId, resourceGroupName, location, + connectorName); } public LinkerResourceImpl withTargetService(TargetServiceBase targetService) { @@ -237,6 +243,26 @@ 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 033bdccd23820..466f68e766443 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,26 +34,32 @@ 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; -/** An instance of this class provides access to all the operations defined in LinkersClient. */ +/** + * An instance of this class provides access to all the operations defined in LinkersClient. + */ public final class LinkersClientImpl implements LinkersClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final LinkersService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ServiceLinkerManagementClientImpl client; /** * Initializes an instance of LinkersClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ LinkersClientImpl(ServiceLinkerManagementClientImpl client) { @@ -67,106 +73,83 @@ public final class LinkersClientImpl implements LinkersClient { */ @Host("{$host}") @ServiceInterface(name = "ServiceLinkerManagem") - private interface LinkersService { - @Headers({"Content-Type: application/json"}) + public interface LinkersService { + @Headers({ "Content-Type: application/json" }) @Get("/{resourceUri}/providers/Microsoft.ServiceLinker/linkers") - @ExpectedResponses({200}) + @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); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@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); + @QueryParam("api-version") String apiVersion, @PathParam("linkerName") String linkerName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Put("/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}") - @ExpectedResponses({200, 201}) + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @QueryParam("api-version") String apiVersion, - @PathParam("linkerName") String linkerName, - @BodyParam("application/json") LinkerResourceInner parameters, - @HeaderParam("Accept") String accept, + @QueryParam("api-version") String apiVersion, @PathParam("linkerName") String linkerName, + @BodyParam("application/json") LinkerResourceInner parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Delete("/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}") - @ExpectedResponses({200, 202, 204}) + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@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); + @QueryParam("api-version") String apiVersion, @PathParam("linkerName") String linkerName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Patch("/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}") - @ExpectedResponses({200, 201}) + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update( - @HostParam("$host") String endpoint, + Mono>> update(@HostParam("$host") String endpoint, @PathParam(value = "resourceUri", encoded = true) String resourceUri, - @QueryParam("api-version") String apiVersion, - @PathParam("linkerName") String linkerName, - @BodyParam("application/json") LinkerPatch parameters, - @HeaderParam("Accept") String accept, + @QueryParam("api-version") String apiVersion, @PathParam("linkerName") String linkerName, + @BodyParam("application/json") LinkerPatch parameters, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Post("/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}/validateLinker") - @ExpectedResponses({200, 202}) + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> validate( - @HostParam("$host") String endpoint, + Mono>> validate(@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); + @QueryParam("api-version") String apiVersion, @PathParam("linkerName") String linkerName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Post("/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}/listConfigurations") - @ExpectedResponses({200}) + @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); + @QueryParam("api-version") String apiVersion, @PathParam("linkerName") String linkerName, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + 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. - * + * Returns list of Linkers which connects to the resource. which supports to config both application and target + * service during the resource provision. + * * @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. @@ -176,34 +159,25 @@ Mono> listNext( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceUri) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.list(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)) + .withContext(context -> service.list(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())); } /** - * Returns list of Linkers which connects to the resource. - * + * Returns list of Linkers which connects to the resource. which supports to config both application and target + * service during the resource provision. + * * @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. @@ -214,32 +188,23 @@ private Mono> listSinglePageAsync(String reso @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(String resourceUri, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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 - .list(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)); + return service.list(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)); } /** - * Returns list of Linkers which connects to the resource. - * + * Returns list of Linkers which connects to the resource. which supports to config both application and target + * service during the resource provision. + * * @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. @@ -252,8 +217,9 @@ private PagedFlux listAsync(String resourceUri) { } /** - * Returns list of Linkers which connects to the resource. - * + * Returns list of Linkers which connects to the resource. which supports to config both application and target + * service during the resource provision. + * * @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. @@ -263,13 +229,14 @@ private PagedFlux listAsync(String resourceUri) { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceUri, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceUri, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(resourceUri, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** - * Returns list of Linkers which connects to the resource. - * + * Returns list of Linkers which connects to the resource. which supports to config both application and target + * service during the resource provision. + * * @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. @@ -282,8 +249,9 @@ public PagedIterable list(String resourceUri) { } /** - * Returns list of Linkers which connects to the resource. - * + * Returns list of Linkers which connects to the resource. which supports to config both application and target + * service during the resource provision. + * * @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. @@ -298,22 +266,20 @@ public PagedIterable list(String resourceUri, Context conte /** * Returns Linker resource for a given name. - * + * * @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 linker of source and target resource along with {@link Response} on successful completion of {@link - * Mono}. + * @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 resourceUri, String linkerName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); @@ -323,39 +289,29 @@ private Mono> getWithResponseAsync(String resource } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - resourceUri, - this.client.getApiVersion(), - linkerName, - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), + linkerName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Returns Linker resource for a given name. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker 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}. + * @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 resourceUri, String linkerName, Context context) { + private Mono> getWithResponseAsync(String resourceUri, String linkerName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); @@ -365,13 +321,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), linkerName, accept, context); + return service.get(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), linkerName, accept, + context); } /** * Returns Linker resource for a given name. - * + * * @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. @@ -386,55 +342,53 @@ private Mono getAsync(String resourceUri, String linkerName /** * Returns Linker resource for a given name. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker 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. + * @return linker of source and target resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LinkerResourceInner get(String resourceUri, String linkerName) { - return getAsync(resourceUri, linkerName).block(); + public Response getWithResponse(String resourceUri, String linkerName, Context context) { + return getWithResponseAsync(resourceUri, linkerName, context).block(); } /** * Returns Linker resource for a given name. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker 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}. + * @return linker of source and target resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceUri, String linkerName, Context context) { - return getWithResponseAsync(resourceUri, linkerName, context).block(); + public LinkerResourceInner get(String resourceUri, String linkerName) { + return getWithResponse(resourceUri, linkerName, Context.NONE).getValue(); } /** - * 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. * @param parameters Linker 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}. + * @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 resourceUri, String linkerName, LinkerResourceInner parameters) { + private Mono>> createOrUpdateWithResponseAsync(String resourceUri, String linkerName, + LinkerResourceInner parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); @@ -449,23 +403,14 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - resourceUri, - this.client.getApiVersion(), - linkerName, - parameters, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), resourceUri, + this.client.getApiVersion(), linkerName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * 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. * @param parameters Linker details. @@ -473,17 +418,15 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @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 resourceUri, String linkerName, LinkerResourceInner parameters, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceUri, String linkerName, + LinkerResourceInner parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); @@ -498,20 +441,13 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - resourceUri, - this.client.getApiVersion(), - linkerName, - parameters, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), linkerName, + parameters, accept, 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. * @param parameters Linker details. @@ -521,22 +457,16 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of linker of source and target resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, LinkerResourceInner> beginCreateOrUpdateAsync( - String resourceUri, String linkerName, LinkerResourceInner parameters) { + private PollerFlux, LinkerResourceInner> + beginCreateOrUpdateAsync(String resourceUri, String linkerName, LinkerResourceInner parameters) { Mono>> mono = createOrUpdateWithResponseAsync(resourceUri, linkerName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - LinkerResourceInner.class, - LinkerResourceInner.class, - this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + LinkerResourceInner.class, LinkerResourceInner.class, this.client.getContext()); } /** - * 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. * @param parameters Linker details. @@ -550,17 +480,15 @@ private PollerFlux, LinkerResourceInner> beginCr private PollerFlux, LinkerResourceInner> beginCreateOrUpdateAsync( String resourceUri, String linkerName, LinkerResourceInner parameters, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceUri, linkerName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), LinkerResourceInner.class, LinkerResourceInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceUri, linkerName, parameters, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + LinkerResourceInner.class, LinkerResourceInner.class, 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. * @param parameters Linker details. @@ -570,14 +498,14 @@ private PollerFlux, LinkerResourceInner> beginCr * @return the {@link SyncPoller} for polling of linker of source and target resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LinkerResourceInner> beginCreateOrUpdate( - String resourceUri, String linkerName, LinkerResourceInner parameters) { - return beginCreateOrUpdateAsync(resourceUri, linkerName, parameters).getSyncPoller(); + public SyncPoller, LinkerResourceInner> beginCreateOrUpdate(String resourceUri, + String linkerName, LinkerResourceInner parameters) { + return this.beginCreateOrUpdateAsync(resourceUri, linkerName, parameters).getSyncPoller(); } /** - * 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. * @param parameters Linker details. @@ -588,14 +516,14 @@ public SyncPoller, LinkerResourceInner> beginCre * @return the {@link SyncPoller} for polling of linker of source and target resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LinkerResourceInner> beginCreateOrUpdate( - String resourceUri, String linkerName, LinkerResourceInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceUri, linkerName, parameters, context).getSyncPoller(); + public SyncPoller, LinkerResourceInner> beginCreateOrUpdate(String resourceUri, + String linkerName, LinkerResourceInner parameters, Context context) { + return this.beginCreateOrUpdateAsync(resourceUri, linkerName, parameters, context).getSyncPoller(); } /** - * 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. * @param parameters Linker details. @@ -605,16 +533,15 @@ public SyncPoller, LinkerResourceInner> beginCre * @return linker of source and target resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceUri, String linkerName, LinkerResourceInner parameters) { - return beginCreateOrUpdateAsync(resourceUri, linkerName, parameters) - .last() + private Mono createOrUpdateAsync(String resourceUri, String linkerName, + LinkerResourceInner parameters) { + return beginCreateOrUpdateAsync(resourceUri, linkerName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * 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. * @param parameters Linker details. @@ -625,16 +552,15 @@ private Mono createOrUpdateAsync( * @return linker of source and target resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceUri, String linkerName, LinkerResourceInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceUri, linkerName, parameters, context) - .last() + private Mono createOrUpdateAsync(String resourceUri, String linkerName, + LinkerResourceInner parameters, Context context) { + return beginCreateOrUpdateAsync(resourceUri, linkerName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * 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. * @param parameters Linker details. @@ -649,8 +575,8 @@ 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. * @param parameters Linker details. @@ -661,14 +587,14 @@ public LinkerResourceInner createOrUpdate(String resourceUri, String linkerName, * @return linker of source and target resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LinkerResourceInner createOrUpdate( - String resourceUri, String linkerName, LinkerResourceInner parameters, Context context) { + public LinkerResourceInner createOrUpdate(String resourceUri, String linkerName, LinkerResourceInner parameters, + Context context) { return createOrUpdateAsync(resourceUri, linkerName, parameters, context).block(); } /** - * Delete a link. - * + * Delete 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. @@ -679,10 +605,8 @@ public LinkerResourceInner createOrUpdate( @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceUri, String linkerName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); @@ -692,22 +616,14 @@ private Mono>> deleteWithResponseAsync(String resource } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - resourceUri, - this.client.getApiVersion(), - linkerName, - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), + linkerName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Delete a link. - * + * Delete a Linker. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. * @param context The context to associate with this operation. @@ -717,13 +633,11 @@ private Mono>> deleteWithResponseAsync(String resource * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceUri, String linkerName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceUri, String linkerName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); @@ -733,13 +647,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), linkerName, accept, context); + return service.delete(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), linkerName, accept, + context); } /** - * Delete a link. - * + * Delete 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. @@ -750,15 +664,13 @@ private Mono>> deleteWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceUri, String linkerName) { Mono>> mono = deleteWithResponseAsync(resourceUri, linkerName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** - * Delete a link. - * + * Delete a Linker. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. * @param context The context to associate with this operation. @@ -768,18 +680,17 @@ private PollerFlux, Void> beginDeleteAsync(String resourceUri, * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceUri, String linkerName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceUri, String linkerName, + Context context) { context = this.client.mergeContext(context); Mono>> mono = deleteWithResponseAsync(resourceUri, linkerName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** - * Delete a link. - * + * Delete 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. @@ -789,12 +700,12 @@ private PollerFlux, Void> beginDeleteAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceUri, String linkerName) { - return beginDeleteAsync(resourceUri, linkerName).getSyncPoller(); + return this.beginDeleteAsync(resourceUri, linkerName).getSyncPoller(); } /** - * Delete a link. - * + * Delete a Linker. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. * @param context The context to associate with this operation. @@ -805,12 +716,12 @@ public SyncPoller, Void> beginDelete(String resourceUri, String */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceUri, String linkerName, Context context) { - return beginDeleteAsync(resourceUri, linkerName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceUri, linkerName, context).getSyncPoller(); } /** - * Delete a link. - * + * Delete 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. @@ -824,8 +735,8 @@ private Mono deleteAsync(String resourceUri, String linkerName) { } /** - * Delete a link. - * + * Delete a Linker. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. * @param context The context to associate with this operation. @@ -840,8 +751,8 @@ private Mono deleteAsync(String resourceUri, String linkerName, Context co } /** - * Delete a link. - * + * Delete 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. @@ -854,8 +765,8 @@ public void delete(String resourceUri, String linkerName) { } /** - * Delete a link. - * + * Delete a Linker. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. * @param context The context to associate with this operation. @@ -869,25 +780,23 @@ public void delete(String resourceUri, String linkerName, Context context) { } /** - * Operation to update an existing link. - * + * Operation to update an existing Linker. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. * @param parameters Linker 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}. + * @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 resourceUri, String linkerName, LinkerPatch parameters) { + private Mono>> updateWithResponseAsync(String resourceUri, String linkerName, + LinkerPatch parameters) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); @@ -902,23 +811,14 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - resourceUri, - this.client.getApiVersion(), - linkerName, - parameters, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), + linkerName, parameters, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Operation to update an existing link. - * + * Operation to update an existing Linker. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. * @param parameters Linker details. @@ -926,17 +826,15 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @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 resourceUri, String linkerName, LinkerPatch parameters, Context context) { + private Mono>> updateWithResponseAsync(String resourceUri, String linkerName, + LinkerPatch parameters, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); @@ -951,20 +849,13 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - resourceUri, - this.client.getApiVersion(), - linkerName, - parameters, - accept, - context); + return service.update(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), linkerName, + parameters, accept, context); } /** - * Operation to update an existing link. - * + * Operation to update an existing Linker. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. * @param parameters Linker details. @@ -974,22 +865,16 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of linker of source and target resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, LinkerResourceInner> beginUpdateAsync( - String resourceUri, String linkerName, LinkerPatch parameters) { + private PollerFlux, LinkerResourceInner> beginUpdateAsync(String resourceUri, + String linkerName, LinkerPatch parameters) { Mono>> mono = updateWithResponseAsync(resourceUri, linkerName, parameters); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - LinkerResourceInner.class, - LinkerResourceInner.class, - this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + LinkerResourceInner.class, LinkerResourceInner.class, this.client.getContext()); } /** - * Operation to update an existing link. - * + * Operation to update an existing Linker. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. * @param parameters Linker details. @@ -1000,19 +885,17 @@ private PollerFlux, LinkerResourceInner> beginUp * @return the {@link PollerFlux} for polling of linker of source and target resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, LinkerResourceInner> beginUpdateAsync( - String resourceUri, String linkerName, LinkerPatch parameters, Context context) { + private PollerFlux, LinkerResourceInner> beginUpdateAsync(String resourceUri, + String linkerName, LinkerPatch parameters, Context context) { context = this.client.mergeContext(context); Mono>> mono = updateWithResponseAsync(resourceUri, linkerName, parameters, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), LinkerResourceInner.class, LinkerResourceInner.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + LinkerResourceInner.class, LinkerResourceInner.class, context); } /** - * Operation to update an existing link. - * + * Operation to update an existing Linker. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. * @param parameters Linker details. @@ -1022,14 +905,14 @@ private PollerFlux, LinkerResourceInner> beginUp * @return the {@link SyncPoller} for polling of linker of source and target resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LinkerResourceInner> beginUpdate( - String resourceUri, String linkerName, LinkerPatch parameters) { - return beginUpdateAsync(resourceUri, linkerName, parameters).getSyncPoller(); + public SyncPoller, LinkerResourceInner> beginUpdate(String resourceUri, + String linkerName, LinkerPatch parameters) { + return this.beginUpdateAsync(resourceUri, linkerName, parameters).getSyncPoller(); } /** - * Operation to update an existing link. - * + * Operation to update an existing Linker. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. * @param parameters Linker details. @@ -1040,14 +923,14 @@ public SyncPoller, LinkerResourceInner> beginUpd * @return the {@link SyncPoller} for polling of linker of source and target resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, LinkerResourceInner> beginUpdate( - String resourceUri, String linkerName, LinkerPatch parameters, Context context) { - return beginUpdateAsync(resourceUri, linkerName, parameters, context).getSyncPoller(); + public SyncPoller, LinkerResourceInner> beginUpdate(String resourceUri, + String linkerName, LinkerPatch parameters, Context context) { + return this.beginUpdateAsync(resourceUri, linkerName, parameters, context).getSyncPoller(); } /** - * Operation to update an existing link. - * + * Operation to update an existing Linker. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. * @param parameters Linker details. @@ -1058,14 +941,13 @@ public SyncPoller, LinkerResourceInner> beginUpd */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceUri, String linkerName, LinkerPatch parameters) { - return beginUpdateAsync(resourceUri, linkerName, parameters) - .last() + return beginUpdateAsync(resourceUri, linkerName, parameters).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Operation to update an existing link. - * + * Operation to update an existing Linker. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. * @param parameters Linker details. @@ -1076,16 +958,15 @@ private Mono updateAsync(String resourceUri, String linkerN * @return linker of source and target resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceUri, String linkerName, LinkerPatch parameters, Context context) { - return beginUpdateAsync(resourceUri, linkerName, parameters, context) - .last() + private Mono updateAsync(String resourceUri, String linkerName, LinkerPatch parameters, + Context context) { + return beginUpdateAsync(resourceUri, linkerName, parameters, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Operation to update an existing link. - * + * Operation to update an existing Linker. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. * @param parameters Linker details. @@ -1100,8 +981,8 @@ public LinkerResourceInner update(String resourceUri, String linkerName, LinkerP } /** - * Operation to update an existing link. - * + * Operation to update an existing Linker. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. * @param parameters Linker details. @@ -1117,23 +998,21 @@ public LinkerResourceInner update(String resourceUri, String linkerName, LinkerP } /** - * Validate a link. - * + * Validate 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 the validation operation result for a linker along with {@link Response} on successful completion of - * {@link Mono}. + * @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 resourceUri, String linkerName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); @@ -1143,39 +1022,29 @@ private Mono>> validateWithResponseAsync(String resour } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .validate( - this.client.getEndpoint(), - resourceUri, - this.client.getApiVersion(), - linkerName, - accept, - context)) + .withContext(context -> service.validate(this.client.getEndpoint(), resourceUri, + this.client.getApiVersion(), linkerName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * Validate a link. - * + * Validate a Linker. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker 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}. + * @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 resourceUri, String linkerName, Context context) { + private Mono>> validateWithResponseAsync(String resourceUri, String linkerName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); @@ -1185,102 +1054,92 @@ private Mono>> validateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .validate(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), linkerName, accept, context); + return service.validate(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), linkerName, accept, + context); } /** - * Validate a link. - * + * Validate 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 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> beginValidateAsync( - String resourceUri, String linkerName) { + private PollerFlux, ValidateOperationResultInner> + beginValidateAsync(String resourceUri, String linkerName) { Mono>> mono = validateWithResponseAsync(resourceUri, linkerName); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ValidateOperationResultInner.class, - ValidateOperationResultInner.class, - this.client.getContext()); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ValidateOperationResultInner.class, ValidateOperationResultInner.class, + this.client.getContext()); } /** - * Validate a link. - * + * Validate a Linker. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker 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. + * @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 resourceUri, String linkerName, Context context) { + private PollerFlux, ValidateOperationResultInner> + beginValidateAsync(String resourceUri, String linkerName, Context context) { context = this.client.mergeContext(context); Mono>> mono = validateWithResponseAsync(resourceUri, linkerName, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ValidateOperationResultInner.class, - ValidateOperationResultInner.class, - context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ValidateOperationResultInner.class, ValidateOperationResultInner.class, + context); } /** - * Validate a link. - * + * Validate 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 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> beginValidate( - String resourceUri, String linkerName) { - return beginValidateAsync(resourceUri, linkerName).getSyncPoller(); + public SyncPoller, ValidateOperationResultInner> + beginValidate(String resourceUri, String linkerName) { + return this.beginValidateAsync(resourceUri, linkerName).getSyncPoller(); } /** - * Validate a link. - * + * Validate a Linker. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker 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. + * @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 resourceUri, String linkerName, Context context) { - return beginValidateAsync(resourceUri, linkerName, context).getSyncPoller(); + public SyncPoller, ValidateOperationResultInner> + beginValidate(String resourceUri, String linkerName, Context context) { + return this.beginValidateAsync(resourceUri, linkerName, context).getSyncPoller(); } /** - * Validate a link. - * + * Validate 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 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) { @@ -1288,32 +1147,31 @@ private Mono validateAsync(String resourceUri, Str } /** - * Validate a link. - * + * Validate a Linker. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker 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}. + * @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) { - return beginValidateAsync(resourceUri, linkerName, context) - .last() + return beginValidateAsync(resourceUri, linkerName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** - * Validate a link. - * + * Validate 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 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) { @@ -1321,15 +1179,15 @@ public ValidateOperationResultInner validate(String resourceUri, String linkerNa } /** - * Validate a link. - * + * Validate a Linker. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker 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. + * @return the validation operation result for a Linker. */ @ServiceMethod(returns = ReturnType.SINGLE) public ValidateOperationResultInner validate(String resourceUri, String linkerName, Context context) { @@ -1337,24 +1195,22 @@ 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listConfigurationsWithResponseAsync( - String resourceUri, String linkerName) { + private Mono> listConfigurationsWithResponseAsync(String resourceUri, + String linkerName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); @@ -1364,22 +1220,14 @@ private Mono> listConfigurationsWithRes } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listConfigurations( - this.client.getEndpoint(), - resourceUri, - this.client.getApiVersion(), - linkerName, - accept, - context)) + .withContext(context -> service.listConfigurations(this.client.getEndpoint(), resourceUri, + this.client.getApiVersion(), linkerName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** - * 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. * @param context The context to associate with this operation. @@ -1387,16 +1235,14 @@ private Mono> listConfigurationsWithRes * @throws 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}. + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listConfigurationsWithResponseAsync( - String resourceUri, String linkerName, Context context) { + private Mono> listConfigurationsWithResponseAsync(String resourceUri, + String linkerName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be 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.")); @@ -1406,65 +1252,66 @@ private Mono> listConfigurationsWithRes } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listConfigurations( - this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), linkerName, accept, context); + return service.listConfigurations(this.client.getEndpoint(), resourceUri, this.client.getApiVersion(), + linkerName, accept, 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * 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. + * @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. + * @return configurations for source resource, include appSettings, connectionString and serviceBindings along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SourceConfigurationResultInner listConfigurations(String resourceUri, String linkerName) { - return listConfigurationsAsync(resourceUri, linkerName).block(); + 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. - * @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}. + * @return configurations for source resource, include appSettings, connectionString and serviceBindings. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listConfigurationsWithResponse( - String resourceUri, String linkerName, Context context) { - return listConfigurationsWithResponseAsync(resourceUri, linkerName, context).block(); + public ConfigurationResultInner listConfigurations(String resourceUri, String linkerName) { + return listConfigurationsWithResponse(resourceUri, linkerName, Context.NONE).getValue(); } /** * Get the next page of items. - * - * @param nextLink The nextLink parameter. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1476,30 +1323,22 @@ private Mono> listNextSinglePageAsync(String 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.")); + 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)) + 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 nextLink parameter. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. * @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. @@ -1512,23 +1351,13 @@ private Mono> listNextSinglePageAsync(String 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.")); + 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)); + 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/LinkersImpl.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/LinkersImpl.java index 75322fa6ef05b..0abf1b51bff17 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,13 @@ 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.LinkerPatch; 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 { @@ -25,8 +26,8 @@ public final class LinkersImpl implements Linkers { private final com.azure.resourcemanager.servicelinker.ServiceLinkerManager serviceManager; - public LinkersImpl( - LinkersClient innerClient, com.azure.resourcemanager.servicelinker.ServiceLinkerManager serviceManager) { + public LinkersImpl(LinkersClient innerClient, + com.azure.resourcemanager.servicelinker.ServiceLinkerManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } @@ -41,6 +42,16 @@ public PagedIterable list(String resourceUri, Context context) { return Utils.mapPage(inner, inner1 -> new LinkerResourceImpl(inner1, this.manager())); } + public Response getWithResponse(String resourceUri, String linkerName, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceUri, linkerName, 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 resourceUri, String linkerName) { LinkerResourceInner inner = this.serviceClient().get(resourceUri, linkerName); if (inner != null) { @@ -50,14 +61,20 @@ public LinkerResource get(String resourceUri, String linkerName) { } } - public Response getWithResponse(String resourceUri, String linkerName, Context context) { - Response inner = this.serviceClient().getWithResponse(resourceUri, linkerName, context); + public LinkerResource createOrUpdate(String resourceUri, String linkerName, LinkerResourceInner parameters) { + LinkerResourceInner inner = this.serviceClient().createOrUpdate(resourceUri, linkerName, parameters); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new LinkerResourceImpl(inner.getValue(), this.manager())); + return new LinkerResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public LinkerResource createOrUpdate(String resourceUri, String linkerName, LinkerResourceInner parameters, + Context context) { + LinkerResourceInner inner = this.serviceClient().createOrUpdate(resourceUri, linkerName, parameters, context); + if (inner != null) { + return new LinkerResourceImpl(inner, this.manager()); } else { return null; } @@ -71,6 +88,24 @@ public void delete(String resourceUri, String linkerName, Context context) { this.serviceClient().delete(resourceUri, linkerName, context); } + public LinkerResource update(String resourceUri, String linkerName, LinkerPatch parameters) { + LinkerResourceInner inner = this.serviceClient().update(resourceUri, linkerName, parameters); + if (inner != null) { + return new LinkerResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public LinkerResource update(String resourceUri, String linkerName, LinkerPatch parameters, Context context) { + LinkerResourceInner inner = this.serviceClient().update(resourceUri, linkerName, parameters, context); + if (inner != null) { + return new LinkerResourceImpl(inner, this.manager()); + } else { + return null; + } + } + public ValidateOperationResult validate(String resourceUri, String linkerName) { ValidateOperationResultInner inner = this.serviceClient().validate(resourceUri, linkerName); if (inner != null) { @@ -89,126 +124,27 @@ public ValidateOperationResult validate(String resourceUri, String linkerName, C } } - public SourceConfigurationResult listConfigurations(String resourceUri, String linkerName) { - SourceConfigurationResultInner inner = this.serviceClient().listConfigurations(resourceUri, linkerName); + public Response listConfigurationsWithResponse(String resourceUri, String linkerName, + Context context) { + Response inner + = this.serviceClient().listConfigurationsWithResponse(resourceUri, linkerName, context); if (inner != null) { - return new SourceConfigurationResultImpl(inner, this.manager()); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ConfigurationResultImpl(inner.getValue(), this.manager())); } else { return null; } } - public Response listConfigurationsWithResponse( - String resourceUri, String linkerName, Context context) { - Response inner = - this.serviceClient().listConfigurationsWithResponse(resourceUri, linkerName, context); + public ConfigurationResult listConfigurations(String resourceUri, String linkerName) { + ConfigurationResultInner inner = this.serviceClient().listConfigurations(resourceUri, linkerName); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new SourceConfigurationResultImpl(inner.getValue(), this.manager())); + return new ConfigurationResultImpl(inner, this.manager()); } else { return null; } } - public LinkerResource getById(String id) { - String resourceUri = - Utils - .getValueFromIdByParameterName( - id, "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}", "resourceUri"); - if (resourceUri == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceUri'.", id))); - } - String linkerName = - Utils - .getValueFromIdByParameterName( - id, "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}", "linkerName"); - if (linkerName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'linkers'.", id))); - } - return this.getWithResponse(resourceUri, linkerName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceUri = - Utils - .getValueFromIdByParameterName( - id, "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}", "resourceUri"); - if (resourceUri == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceUri'.", id))); - } - String linkerName = - Utils - .getValueFromIdByParameterName( - id, "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}", "linkerName"); - if (linkerName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'linkers'.", id))); - } - return this.getWithResponse(resourceUri, linkerName, context); - } - - public void deleteById(String id) { - String resourceUri = - Utils - .getValueFromIdByParameterName( - id, "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}", "resourceUri"); - if (resourceUri == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceUri'.", id))); - } - String linkerName = - Utils - .getValueFromIdByParameterName( - id, "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}", "linkerName"); - if (linkerName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'linkers'.", id))); - } - this.delete(resourceUri, linkerName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceUri = - Utils - .getValueFromIdByParameterName( - id, "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}", "resourceUri"); - if (resourceUri == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resourceUri'.", id))); - } - String linkerName = - Utils - .getValueFromIdByParameterName( - id, "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}", "linkerName"); - if (linkerName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'linkers'.", id))); - } - this.delete(resourceUri, linkerName, context); - } - private LinkersClient serviceClient() { return this.innerClient; } @@ -216,8 +152,4 @@ private LinkersClient serviceClient() { private com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager() { return this.serviceManager; } - - public LinkerResourceImpl define(String name) { - return new LinkerResourceImpl(name, this.manager()); - } } 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 new file mode 100644 index 0000000000000..f1e2c723724f7 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/LinkersOperationsClientImpl.java @@ -0,0 +1,1078 @@ +// 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.DryrunResourceInner; +import com.azure.resourcemanager.servicelinker.models.ConfigurationInfo; +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("{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); + } + + /** + * 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(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 + * + * The nextLink parameter. + * @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)); + } +} 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 new file mode 100644 index 0000000000000..926f08d683a5b --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/LinkersOperationsImpl.java @@ -0,0 +1,137 @@ +// 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.DryrunResourceInner; +import com.azure.resourcemanager.servicelinker.models.ConfigurationInfo; +import com.azure.resourcemanager.servicelinker.models.ConfigurationResult; +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 Utils.mapPage(inner, inner1 -> new DryrunResourceImpl(inner1, this.manager())); + } + + public PagedIterable listDryrun(String resourceUri, Context context) { + PagedIterable inner = this.serviceClient().listDryrun(resourceUri, context); + return Utils.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; + } + } + + 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/OperationImpl.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/OperationImpl.java index efdd8fc80cd28..62c554ebcb251 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/OperationImpl.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/OperationImpl.java @@ -15,8 +15,8 @@ public final class OperationImpl implements Operation { private final com.azure.resourcemanager.servicelinker.ServiceLinkerManager serviceManager; - OperationImpl( - OperationInner innerObject, com.azure.resourcemanager.servicelinker.ServiceLinkerManager serviceManager) { + OperationImpl(OperationInner innerObject, + com.azure.resourcemanager.servicelinker.ServiceLinkerManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/OperationsClientImpl.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/OperationsClientImpl.java index fdd4c7907423a..79ca516e23a04 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/OperationsClientImpl.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/OperationsClientImpl.java @@ -30,22 +30,28 @@ import com.azure.resourcemanager.servicelinker.models.OperationListResult; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public final class OperationsClientImpl implements OperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final OperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ServiceLinkerManagementClientImpl client; /** * Initializes an instance of OperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ OperationsClientImpl(ServiceLinkerManagementClientImpl client) { - this.service = - RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -55,100 +61,75 @@ public final class OperationsClientImpl implements OperationsClient { */ @Host("{$host}") @ServiceInterface(name = "ServiceLinkerManagem") - private interface OperationsService { - @Headers({"Content-Type: application/json"}) + public interface OperationsService { + @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.ServiceLinker/operations") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Lists the available ServiceLinker REST API operations. - * + * * @throws 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 list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + 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(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>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 available ServiceLinker REST API operations. - * + * * @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 list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists the available ServiceLinker REST API operations. - * + * * @throws 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 list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedFlux}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { @@ -157,27 +138,27 @@ private PagedFlux listAsync() { /** * Lists the available ServiceLinker REST API operations. - * + * * @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 list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedFlux}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Lists the available ServiceLinker REST API operations. - * + * * @throws 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 list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list() { @@ -186,13 +167,13 @@ public PagedIterable list() { /** * Lists the available ServiceLinker REST API operations. - * + * * @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 list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list(Context context) { @@ -201,13 +182,15 @@ public PagedIterable list(Context context) { /** * Get the next page of items. - * - * @param nextLink The nextLink parameter. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -215,36 +198,28 @@ private Mono> listNextSinglePageAsync(String nextL 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.")); + 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)) + 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 nextLink parameter. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. * @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 list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -252,23 +227,13 @@ private Mono> listNextSinglePageAsync(String nextL 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.")); + 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)); + 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/OperationsImpl.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/OperationsImpl.java index f0c8895b39880..535f6333fe68a 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/OperationsImpl.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/OperationsImpl.java @@ -19,8 +19,8 @@ public final class OperationsImpl implements Operations { private final com.azure.resourcemanager.servicelinker.ServiceLinkerManager serviceManager; - public OperationsImpl( - OperationsClient innerClient, com.azure.resourcemanager.servicelinker.ServiceLinkerManager serviceManager) { + public OperationsImpl(OperationsClient innerClient, + com.azure.resourcemanager.servicelinker.ServiceLinkerManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ServiceLinkerManagementClientBuilder.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ServiceLinkerManagementClientBuilder.java index 018b9b5b585ee..974122d51a1c9 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ServiceLinkerManagementClientBuilder.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ServiceLinkerManagementClientBuilder.java @@ -14,8 +14,10 @@ import com.azure.core.util.serializer.SerializerAdapter; import java.time.Duration; -/** A builder for creating a new instance of the ServiceLinkerManagementClientImpl type. */ -@ServiceClientBuilder(serviceClients = {ServiceLinkerManagementClientImpl.class}) +/** + * A builder for creating a new instance of the ServiceLinkerManagementClientImpl type. + */ +@ServiceClientBuilder(serviceClients = { ServiceLinkerManagementClientImpl.class }) public final class ServiceLinkerManagementClientBuilder { /* * server parameter @@ -24,7 +26,7 @@ public final class ServiceLinkerManagementClientBuilder { /** * Sets server parameter. - * + * * @param endpoint the endpoint value. * @return the ServiceLinkerManagementClientBuilder. */ @@ -40,7 +42,7 @@ public ServiceLinkerManagementClientBuilder endpoint(String endpoint) { /** * Sets The environment to connect to. - * + * * @param environment the environment value. * @return the ServiceLinkerManagementClientBuilder. */ @@ -56,7 +58,7 @@ public ServiceLinkerManagementClientBuilder environment(AzureEnvironment environ /** * Sets The HTTP pipeline to send requests through. - * + * * @param pipeline the pipeline value. * @return the ServiceLinkerManagementClientBuilder. */ @@ -72,7 +74,7 @@ public ServiceLinkerManagementClientBuilder pipeline(HttpPipeline pipeline) { /** * Sets The default poll interval for long-running operation. - * + * * @param defaultPollInterval the defaultPollInterval value. * @return the ServiceLinkerManagementClientBuilder. */ @@ -88,7 +90,7 @@ public ServiceLinkerManagementClientBuilder defaultPollInterval(Duration default /** * Sets The serializer to serialize an object into a string. - * + * * @param serializerAdapter the serializerAdapter value. * @return the ServiceLinkerManagementClientBuilder. */ @@ -99,28 +101,20 @@ public ServiceLinkerManagementClientBuilder serializerAdapter(SerializerAdapter /** * Builds an instance of ServiceLinkerManagementClientImpl with the provided parameters. - * + * * @return an instance of ServiceLinkerManagementClientImpl. */ public ServiceLinkerManagementClientImpl buildClient() { - if (endpoint == null) { - this.endpoint = "https://management.azure.com"; - } - if (environment == null) { - this.environment = AzureEnvironment.AZURE; - } - if (pipeline == null) { - this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - } - if (defaultPollInterval == null) { - this.defaultPollInterval = Duration.ofSeconds(30); - } - if (serializerAdapter == null) { - this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); - } - ServiceLinkerManagementClientImpl client = - new ServiceLinkerManagementClientImpl( - pipeline, serializerAdapter, defaultPollInterval, environment, endpoint); + String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; + AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; + HttpPipeline localPipeline = (pipeline != null) ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval + = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); + ServiceLinkerManagementClientImpl client = new ServiceLinkerManagementClientImpl(localPipeline, + localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint); return client; } } 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 49a6b1554356a..69944b2b8f882 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 @@ -22,7 +22,10 @@ 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; @@ -34,120 +37,177 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** Initializes a new instance of the ServiceLinkerManagementClientImpl type. */ +/** + * Initializes a new instance of the ServiceLinkerManagementClientImpl type. + */ @ServiceClient(builder = ServiceLinkerManagementClientBuilder.class) public final class ServiceLinkerManagementClientImpl implements ServiceLinkerManagementClient { - /** server parameter. */ + /** + * server parameter. + */ private final String endpoint; /** * Gets server parameter. - * + * * @return the endpoint value. */ public String getEndpoint() { return this.endpoint; } - /** Api Version. */ + /** + * Api Version. + */ private final String apiVersion; /** * Gets Api Version. - * + * * @return the apiVersion value. */ public String getApiVersion() { return this.apiVersion; } - /** The HTTP pipeline to send requests through. */ + /** + * The HTTP pipeline to send requests through. + */ private final HttpPipeline httpPipeline; /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ public HttpPipeline getHttpPipeline() { return this.httpPipeline; } - /** The serializer to serialize an object into a string. */ + /** + * The serializer to serialize an object into a string. + */ private final SerializerAdapter serializerAdapter; /** * Gets The serializer to serialize an object into a string. - * + * * @return the serializerAdapter value. */ SerializerAdapter getSerializerAdapter() { return this.serializerAdapter; } - /** The default poll interval for long-running operation. */ + /** + * The default poll interval for long-running operation. + */ private final Duration defaultPollInterval; /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } - /** The LinkersClient object to access its operations. */ + /** + * 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. + */ private final LinkersClient linkers; /** * Gets the LinkersClient object to access its operations. - * + * * @return the LinkersClient object. */ public LinkersClient getLinkers() { return this.linkers; } - /** The OperationsClient object to access its operations. */ + /** + * 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. + */ private final OperationsClient operations; /** * Gets the OperationsClient object to access its operations. - * + * * @return the OperationsClient object. */ 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. - * + * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. * @param endpoint server parameter. */ - ServiceLinkerManagementClientImpl( - HttpPipeline httpPipeline, - SerializerAdapter serializerAdapter, - Duration defaultPollInterval, - AzureEnvironment environment, - String endpoint) { + ServiceLinkerManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String endpoint) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; this.endpoint = endpoint; - this.apiVersion = "2022-05-01"; + this.apiVersion = "2022-11-01-preview"; + this.connectors = new ConnectorsClientImpl(this); this.linkers = new LinkersClientImpl(this); + this.linkersOperations = new LinkersOperationsClientImpl(this); this.operations = new OperationsClientImpl(this); + this.configurationNamesOperations = new ConfigurationNamesOperationsClientImpl(this); } /** * Gets default client context. - * + * * @return the default client context. */ public Context getContext() { @@ -156,7 +216,7 @@ public Context getContext() { /** * Merges default client context with provided context. - * + * * @param context the context to be merged with default client context. * @return the merged context. */ @@ -166,7 +226,7 @@ public Context mergeContext(Context context) { /** * Gets long running operation result. - * + * * @param activationResponse the response of activation operation. * @param httpPipeline the http pipeline. * @param pollResultType type of poll result. @@ -176,26 +236,15 @@ public Context mergeContext(Context context) { * @param type of final result. * @return poller flux for poll result and final result. */ - public PollerFlux, U> getLroResult( - Mono>> activationResponse, - HttpPipeline httpPipeline, - Type pollResultType, - Type finalResultType, - Context context) { - return PollerFactory - .create( - serializerAdapter, - httpPipeline, - pollResultType, - finalResultType, - defaultPollInterval, - activationResponse, - context); + public PollerFlux, U> getLroResult(Mono>> activationResponse, + HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { + return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, activationResponse, context); } /** * Gets the final result, or an error, based on last async poll response. - * + * * @param response the last async poll response. * @param type of poll result. * @param type of final result. @@ -208,19 +257,16 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, HttpResponse errorResponse = null; PollResult.Error lroError = response.getValue().getError(); if (lroError != null) { - errorResponse = - new HttpResponseImpl( - lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody()); + errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), + lroError.getResponseBody()); errorMessage = response.getValue().getError().getMessage(); String errorBody = response.getValue().getError().getResponseBody(); if (errorBody != null) { // try to deserialize error body to ManagementError try { - managementError = - this - .getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); + managementError = this.getSerializerAdapter().deserialize(errorBody, ManagementError.class, + SerializerEncoding.JSON); if (managementError.getCode() == null || managementError.getMessage() == null) { managementError = null; } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/Utils.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/Utils.java index 665bda23b8d05..5f8db61ea9abd 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/Utils.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/Utils.java @@ -20,6 +20,9 @@ import reactor.core.publisher.Flux; final class Utils { + private Utils() { + } + static String getValueFromIdByName(String id, String name) { if (id == null) { return null; @@ -38,6 +41,7 @@ static String getValueFromIdByName(String id, String name) { } } return null; + } static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { @@ -60,7 +64,7 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri segments.add(idSegment); idItrReverted.forEachRemaining(segments::add); Collections.reverse(segments); - if (segments.size() > 0 && segments.get(0).isEmpty()) { + if (!segments.isEmpty() && segments.get(0).isEmpty()) { segments.remove(0); } return String.join("/", segments); @@ -71,10 +75,11 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri } } return null; + } static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { - return new PagedIterableImpl(pageIterable, mapper); + return new PagedIterableImpl<>(pageIterable, mapper); } private static final class PagedIterableImpl extends PagedIterable { @@ -84,26 +89,17 @@ private static final class PagedIterableImpl extends PagedIterable { private final Function, PagedResponse> pageMapper; private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super( - PagedFlux - .create( - () -> - (continuationToken, pageSize) -> - Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); + super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux + .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); this.pagedIterable = pagedIterable; this.mapper = mapper; this.pageMapper = getPageMapper(mapper); } private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> - new PagedResponseBase( - page.getRequest(), - page.getStatusCode(), - page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), - page.getContinuationToken(), - null); + return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), + page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), + null); } @Override @@ -133,30 +129,27 @@ public Stream> streamByPage(String continuationToken, int prefe @Override public Iterator iterator() { - return new IteratorImpl(pagedIterable.iterator(), mapper); + return new IteratorImpl<>(pagedIterable.iterator(), mapper); } @Override public Iterable> iterableByPage() { - return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); } @Override public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); } @Override public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(preferredPageSize), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); } @Override public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); } } @@ -198,7 +191,7 @@ private IterableImpl(Iterable iterable, Function mapper) { @Override public Iterator iterator() { - return new IteratorImpl(iterable.iterator(), mapper); + return new IteratorImpl<>(iterable.iterator(), mapper); } } } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ValidateOperationResultImpl.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ValidateOperationResultImpl.java index b6b84aaf65973..ebaff88845c3b 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ValidateOperationResultImpl.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ValidateOperationResultImpl.java @@ -17,8 +17,7 @@ public final class ValidateOperationResultImpl implements ValidateOperationResul private final com.azure.resourcemanager.servicelinker.ServiceLinkerManager serviceManager; - ValidateOperationResultImpl( - ValidateOperationResultInner innerObject, + ValidateOperationResultImpl(ValidateOperationResultInner innerObject, com.azure.resourcemanager.servicelinker.ServiceLinkerManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/package-info.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/package-info.java index 73895b04fbc59..2bbb5c6a5d8b9 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/package-info.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the implementations for ServiceLinkerManagementClient. Microsoft.ServiceLinker provider. */ +/** + * Package containing the implementations for ServiceLinkerManagementClient. + * Microsoft.ServiceLinker provider test node 20. + */ package com.azure.resourcemanager.servicelinker.implementation; 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 new file mode 100644 index 0000000000000..d8e77c4fb4fb2 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AccessKeyInfoBase.java @@ -0,0 +1,65 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** + * The access key directly from target resource properties, which target service is Azure Resource, such as + * Microsoft.Storage. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") +@JsonTypeName("accessKey") +@Fluent +public final class AccessKeyInfoBase extends AuthInfoBase { + /* + * 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. + */ + @JsonProperty(value = "permissions") + private List permissions; + + /** + * Creates an instance of AccessKeyInfoBase class. + */ + public AccessKeyInfoBase() { + } + + /** + * 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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} 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 new file mode 100644 index 0000000000000..f9ab5e975b21b --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AccessKeyPermissions.java @@ -0,0 +1,68 @@ +// 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 com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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 765a8393e5c38..8cdd4d9d7f7ec 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 @@ -8,14 +8,37 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ActionType. */ +/** + * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + */ public final class ActionType extends ExpandableStringEnum { - /** Static value Internal for ActionType. */ + /** + * Static value Internal for ActionType. + */ 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. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ActionType() { + } + /** * Creates or finds a ActionType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ActionType. */ @@ -26,7 +49,7 @@ public static ActionType fromString(String name) { /** * Gets known ActionType values. - * + * * @return known ActionType values. */ public static Collection values() { 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 new file mode 100644 index 0000000000000..a89bb5b716ec7 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AllowType.java @@ -0,0 +1,53 @@ +// 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 com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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 d3a34302fddee..61b79d0567428 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 @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The authentication info. */ +/** + * The authentication info. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -17,17 +19,24 @@ defaultImpl = AuthInfoBase.class) @JsonTypeName("AuthInfoBase") @JsonSubTypes({ + @JsonSubTypes.Type(name = "accessKey", value = AccessKeyInfoBase.class), @JsonSubTypes.Type(name = "secret", value = SecretAuthInfo.class), @JsonSubTypes.Type(name = "userAssignedIdentity", value = UserAssignedIdentityAuthInfo.class), @JsonSubTypes.Type(name = "systemAssignedIdentity", value = SystemAssignedIdentityAuthInfo.class), @JsonSubTypes.Type(name = "servicePrincipalSecret", value = ServicePrincipalSecretAuthInfo.class), - @JsonSubTypes.Type(name = "servicePrincipalCertificate", value = ServicePrincipalCertificateAuthInfo.class) -}) + @JsonSubTypes.Type(name = "servicePrincipalCertificate", value = ServicePrincipalCertificateAuthInfo.class), + @JsonSubTypes.Type(name = "userAccount", value = UserAccountAuthInfo.class) }) @Immutable public class AuthInfoBase { + /** + * Creates an instance of AuthInfoBase class. + */ + public AuthInfoBase() { + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { 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 a14c2a2f7a813..b295b92a61194 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 @@ -8,26 +8,57 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AuthType. */ +/** + * The authentication type. + */ public final class AuthType extends ExpandableStringEnum { - /** Static value systemAssignedIdentity for AuthType. */ + /** + * Static value systemAssignedIdentity for AuthType. + */ public static final AuthType SYSTEM_ASSIGNED_IDENTITY = fromString("systemAssignedIdentity"); - /** Static value userAssignedIdentity for AuthType. */ + /** + * Static value userAssignedIdentity for AuthType. + */ public static final AuthType USER_ASSIGNED_IDENTITY = fromString("userAssignedIdentity"); - /** Static value servicePrincipalSecret for AuthType. */ + /** + * Static value servicePrincipalSecret for AuthType. + */ public static final AuthType SERVICE_PRINCIPAL_SECRET = fromString("servicePrincipalSecret"); - /** Static value servicePrincipalCertificate for AuthType. */ + /** + * Static value servicePrincipalCertificate for AuthType. + */ public static final AuthType SERVICE_PRINCIPAL_CERTIFICATE = fromString("servicePrincipalCertificate"); - /** Static value secret for AuthType. */ + /** + * Static value secret for AuthType. + */ 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"); + + /** + * Creates a new instance of AuthType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AuthType() { + } + /** * Creates or finds a AuthType from its string representation. - * + * * @param name a name to look for. * @return the corresponding AuthType. */ @@ -38,7 +69,7 @@ public static AuthType fromString(String name) { /** * Gets known AuthType values. - * + * * @return known AuthType values. */ public static Collection values() { diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AzureKeyVaultProperties.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AzureKeyVaultProperties.java index 41fdcf7777ab8..98d691a1b6fdb 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AzureKeyVaultProperties.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AzureKeyVaultProperties.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The resource properties when type is Azure Key Vault. */ +/** + * The resource properties when type is Azure Key Vault. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("KeyVault") @Fluent @@ -20,9 +22,15 @@ public final class AzureKeyVaultProperties extends AzureResourcePropertiesBase { @JsonProperty(value = "connectAsKubernetesCsiDriver") private Boolean connectAsKubernetesCsiDriver; + /** + * Creates an instance of AzureKeyVaultProperties class. + */ + public AzureKeyVaultProperties() { + } + /** * Get the connectAsKubernetesCsiDriver property: True if connect via Kubernetes CSI Driver. - * + * * @return the connectAsKubernetesCsiDriver value. */ public Boolean connectAsKubernetesCsiDriver() { @@ -31,7 +39,7 @@ public Boolean connectAsKubernetesCsiDriver() { /** * Set the connectAsKubernetesCsiDriver property: True if connect via Kubernetes CSI Driver. - * + * * @param connectAsKubernetesCsiDriver the connectAsKubernetesCsiDriver value to set. * @return the AzureKeyVaultProperties object itself. */ @@ -42,7 +50,7 @@ public AzureKeyVaultProperties withConnectAsKubernetesCsiDriver(Boolean connectA /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AzureResource.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AzureResource.java index 511c4257690e4..abac406b9795f 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AzureResource.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AzureResource.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The azure resource info when target service type is AzureResource. */ +/** + * The azure resource info when target service type is AzureResource. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("AzureResource") @Fluent @@ -26,9 +28,15 @@ public final class AzureResource extends TargetServiceBase { @JsonProperty(value = "resourceProperties") private AzureResourcePropertiesBase resourceProperties; + /** + * Creates an instance of AzureResource class. + */ + public AzureResource() { + } + /** * Get the id property: The Id of azure resource. - * + * * @return the id value. */ public String id() { @@ -37,7 +45,7 @@ public String id() { /** * Set the id property: The Id of azure resource. - * + * * @param id the id value to set. * @return the AzureResource object itself. */ @@ -48,7 +56,7 @@ public AzureResource withId(String id) { /** * Get the resourceProperties property: The azure resource connection related properties. - * + * * @return the resourceProperties value. */ public AzureResourcePropertiesBase resourceProperties() { @@ -57,7 +65,7 @@ public AzureResourcePropertiesBase resourceProperties() { /** * Set the resourceProperties property: The azure resource connection related properties. - * + * * @param resourceProperties the resourceProperties value to set. * @return the AzureResource object itself. */ @@ -68,7 +76,7 @@ public AzureResource withResourceProperties(AzureResourcePropertiesBase resource /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 b551b18943ddf..244551cec3e15 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 @@ -9,19 +9,27 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The azure resource properties. */ +/** + * The azure resource properties. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", defaultImpl = AzureResourcePropertiesBase.class) @JsonTypeName("AzureResourcePropertiesBase") -@JsonSubTypes({@JsonSubTypes.Type(name = "KeyVault", value = AzureKeyVaultProperties.class)}) +@JsonSubTypes({ @JsonSubTypes.Type(name = "KeyVault", value = AzureKeyVaultProperties.class) }) @Immutable public class AzureResourcePropertiesBase { + /** + * Creates an instance of AzureResourcePropertiesBase class. + */ + public AzureResourcePropertiesBase() { + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { 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 ab23f6c1abd40..ea76e884746b1 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 @@ -8,14 +8,27 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AzureResourceType. */ +/** + * The azure resource type. + */ public final class AzureResourceType extends ExpandableStringEnum { - /** Static value KeyVault for AzureResourceType. */ + /** + * Static value KeyVault for AzureResourceType. + */ public static final AzureResourceType KEY_VAULT = fromString("KeyVault"); + /** + * Creates a new instance of AzureResourceType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AzureResourceType() { + } + /** * Creates or finds a AzureResourceType from its string representation. - * + * * @param name a name to look for. * @return the corresponding AzureResourceType. */ @@ -26,7 +39,7 @@ public static AzureResourceType fromString(String name) { /** * Gets known AzureResourceType values. - * + * * @return known AzureResourceType values. */ public static Collection values() { diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/BasicErrorDryrunPrerequisiteResult.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/BasicErrorDryrunPrerequisiteResult.java new file mode 100644 index 0000000000000..53663851faf4f --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/BasicErrorDryrunPrerequisiteResult.java @@ -0,0 +1,86 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The represent of basic error. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("basicError") +@Fluent +public final class BasicErrorDryrunPrerequisiteResult extends DryrunPrerequisiteResult { + /* + * The error code. + */ + @JsonProperty(value = "code") + private String code; + + /* + * The error message. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Creates an instance of BasicErrorDryrunPrerequisiteResult class. + */ + public BasicErrorDryrunPrerequisiteResult() { + } + + /** + * Get the code property: The error code. + * + * @return the code value. + */ + public String code() { + return this.code; + } + + /** + * Set the code property: The error code. + * + * @param code the code value to set. + * @return the BasicErrorDryrunPrerequisiteResult object itself. + */ + public BasicErrorDryrunPrerequisiteResult withCode(String code) { + this.code = code; + return this; + } + + /** + * Get the message property: The error message. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: The error message. + * + * @param message the message value to set. + * @return the BasicErrorDryrunPrerequisiteResult object itself. + */ + public BasicErrorDryrunPrerequisiteResult withMessage(String message) { + this.message = message; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} 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 afad077739f20..a48b76599b4ee 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 @@ -8,41 +8,82 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ClientType. */ +/** + * The application client type. + */ public final class ClientType extends ExpandableStringEnum { - /** Static value none for ClientType. */ + /** + * Static value none for ClientType. + */ public static final ClientType NONE = fromString("none"); - /** Static value dotnet for ClientType. */ + /** + * Static value dotnet for ClientType. + */ public static final ClientType DOTNET = fromString("dotnet"); - /** Static value java for ClientType. */ + /** + * Static value java for ClientType. + */ public static final ClientType JAVA = fromString("java"); - /** Static value python for ClientType. */ + /** + * Static value python for ClientType. + */ public static final ClientType PYTHON = fromString("python"); - /** Static value go for ClientType. */ + /** + * Static value go for ClientType. + */ public static final ClientType GO = fromString("go"); - /** Static value php for ClientType. */ + /** + * Static value php for ClientType. + */ public static final ClientType PHP = fromString("php"); - /** Static value ruby for ClientType. */ + /** + * Static value ruby for ClientType. + */ public static final ClientType RUBY = fromString("ruby"); - /** Static value django for ClientType. */ + /** + * Static value django for ClientType. + */ public static final ClientType DJANGO = fromString("django"); - /** Static value nodejs for ClientType. */ + /** + * Static value nodejs for ClientType. + */ public static final ClientType NODEJS = fromString("nodejs"); - /** Static value springBoot for ClientType. */ + /** + * Static value springBoot for ClientType. + */ public static final ClientType SPRING_BOOT = fromString("springBoot"); + /** + * Static value kafka-springBoot for ClientType. + */ + public static final ClientType KAFKA_SPRING_BOOT = fromString("kafka-springBoot"); + + /** + * Static value dapr for ClientType. + */ + public static final ClientType DAPR = fromString("dapr"); + + /** + * Creates a new instance of ClientType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ClientType() { + } + /** * Creates or finds a ClientType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ClientType. */ @@ -53,7 +94,7 @@ public static ClientType fromString(String name) { /** * Gets known ClientType values. - * + * * @return known ClientType values. */ public static Collection values() { 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 new file mode 100644 index 0000000000000..62d8bb0889962 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationInfo.java @@ -0,0 +1,178 @@ +// 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.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * The configuration information, used to generate configurations or save to applications. + */ +@Fluent +public final class ConfigurationInfo { + /* + * Indicates whether to clean up previous operation when Linker is updating or deleting + */ + @JsonProperty(value = "deleteOrUpdateBehavior") + 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. + */ + @JsonProperty(value = "action") + 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 + */ + @JsonProperty(value = "customizedKeys") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map customizedKeys; + + /* + * Indicates some additional properties for dapr client type + */ + @JsonProperty(value = "daprProperties") + 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 + */ + @JsonProperty(value = "additionalConfigurations") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map additionalConfigurations; + + /** + * 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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (daprProperties() != null) { + daprProperties().validate(); + } + } +} 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 new file mode 100644 index 0000000000000..2ad0b5d948720 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationName.java @@ -0,0 +1,106 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; + +/** + * The configuration names. + */ +@Fluent +public final class ConfigurationName { + /* + * The value property. + */ + @JsonProperty(value = "value") + private String value; + + /* + * Description for the configuration name. + */ + @JsonProperty(value = "description") + private String description; + + /* + * Represent the configuration is required or not + */ + @JsonProperty(value = "required") + 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() { + } +} 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 new file mode 100644 index 0000000000000..4b06e238c8280 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationNameItem.java @@ -0,0 +1,55 @@ +// 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 daprProperties property: Indicates some additional properties for dapr client type. + * + * @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 new file mode 100644 index 0000000000000..9470c085784f2 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationNameResult.java @@ -0,0 +1,74 @@ +// 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.resourcemanager.servicelinker.fluent.models.ConfigurationNameItemInner; +import com.fasterxml.jackson.annotation.JsonProperty; +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 { + /* + * Expected configuration names for each target service. + */ + @JsonProperty(value = "value") + private List value; + + /* + * Link to next page of resources. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + 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()); + } + } +} 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 new file mode 100644 index 0000000000000..2e524b4c0f897 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationNamesOperations.java @@ -0,0 +1,37 @@ +// 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/SourceConfigurationResult.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationResult.java similarity index 62% rename from sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SourceConfigurationResult.java rename to sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationResult.java index 808f14d90d877..44ac433d9a440 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SourceConfigurationResult.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfigurationResult.java @@ -4,22 +4,24 @@ package com.azure.resourcemanager.servicelinker.models; -import com.azure.resourcemanager.servicelinker.fluent.models.SourceConfigurationResultInner; +import com.azure.resourcemanager.servicelinker.fluent.models.ConfigurationResultInner; import java.util.List; -/** An immutable client-side representation of SourceConfigurationResult. */ -public interface SourceConfigurationResult { +/** + * An immutable client-side representation of ConfigurationResult. + */ +public interface ConfigurationResult { /** * Gets the configurations property: The configuration properties for source resource. - * + * * @return the configurations value. */ List configurations(); /** - * Gets the inner com.azure.resourcemanager.servicelinker.fluent.models.SourceConfigurationResultInner object. - * + * Gets the inner com.azure.resourcemanager.servicelinker.fluent.models.ConfigurationResultInner object. + * * @return the inner object. */ - SourceConfigurationResultInner innerModel(); + ConfigurationResultInner innerModel(); } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfluentBootstrapServer.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfluentBootstrapServer.java index 195d2c0345541..db3ac6c8d3d45 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfluentBootstrapServer.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfluentBootstrapServer.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The service properties when target service type is ConfluentBootstrapServer. */ +/** + * The service properties when target service type is ConfluentBootstrapServer. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("ConfluentBootstrapServer") @Fluent @@ -20,9 +22,15 @@ public final class ConfluentBootstrapServer extends TargetServiceBase { @JsonProperty(value = "endpoint") private String endpoint; + /** + * Creates an instance of ConfluentBootstrapServer class. + */ + public ConfluentBootstrapServer() { + } + /** * Get the endpoint property: The endpoint of service. - * + * * @return the endpoint value. */ public String endpoint() { @@ -31,7 +39,7 @@ public String endpoint() { /** * Set the endpoint property: The endpoint of service. - * + * * @param endpoint the endpoint value to set. * @return the ConfluentBootstrapServer object itself. */ @@ -42,7 +50,7 @@ public ConfluentBootstrapServer withEndpoint(String endpoint) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfluentSchemaRegistry.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfluentSchemaRegistry.java index 68321e5ebc965..918d329921870 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfluentSchemaRegistry.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfluentSchemaRegistry.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The service properties when target service type is ConfluentSchemaRegistry. */ +/** + * The service properties when target service type is ConfluentSchemaRegistry. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("ConfluentSchemaRegistry") @Fluent @@ -20,9 +22,15 @@ public final class ConfluentSchemaRegistry extends TargetServiceBase { @JsonProperty(value = "endpoint") private String endpoint; + /** + * Creates an instance of ConfluentSchemaRegistry class. + */ + public ConfluentSchemaRegistry() { + } + /** * Get the endpoint property: The endpoint of service. - * + * * @return the endpoint value. */ public String endpoint() { @@ -31,7 +39,7 @@ public String endpoint() { /** * Set the endpoint property: The endpoint of service. - * + * * @param endpoint the endpoint value to set. * @return the ConfluentSchemaRegistry object itself. */ @@ -42,7 +50,7 @@ public ConfluentSchemaRegistry withEndpoint(String endpoint) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 new file mode 100644 index 0000000000000..20ac9686f5677 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/Connectors.java @@ -0,0 +1,358 @@ +// 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; + +/** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * Returns Connector resource for a given name. + * + * @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 linker of source and target resource along with {@link Response}. + */ + LinkerResource getById(String id); + + /** + * Returns Connector resource for a given name. + * + * @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 linker of source and target resource along with {@link Response}. + */ + Response getByIdWithResponse(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); + + /** + * Delete a Connector. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a Connector. + * + * @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. + */ + void deleteByIdWithResponse(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 defineDryrun(String name); + + /** + * Begins definition for a new LinkerResource resource. + * + * @param name resource name. + * @return the first stage of the new LinkerResource definition. + */ + LinkerResource.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 new file mode 100644 index 0000000000000..b40f85a305503 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/CreateOrUpdateDryrunParameters.java @@ -0,0 +1,277 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The dryrun parameters for creation or update a linker. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "actionName") +@JsonTypeName("createOrUpdate") +@Fluent +public final class CreateOrUpdateDryrunParameters extends DryrunParameters { + /* + * The target service properties + */ + @JsonProperty(value = "targetService") + private TargetServiceBase targetService; + + /* + * The authentication type. + */ + @JsonProperty(value = "authInfo") + private AuthInfoBase authInfo; + + /* + * The application client type + */ + @JsonProperty(value = "clientType") + private ClientType clientType; + + /* + * The provisioning state. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * The VNet solution. + */ + @JsonProperty(value = "vNetSolution") + private VNetSolution vNetSolution; + + /* + * An option to store secret value in secure place + */ + @JsonProperty(value = "secretStore") + private SecretStore secretStore; + + /* + * connection scope in source service. + */ + @JsonProperty(value = "scope") + private String scope; + + /* + * The network solution. + */ + @JsonProperty(value = "publicNetworkSolution") + private PublicNetworkSolution publicNetworkSolution; + + /* + * The connection information consumed by applications, including secrets, connection strings. + */ + @JsonProperty(value = "configurationInfo") + private ConfigurationInfo configurationInfo; + + /** + * Creates an instance of CreateOrUpdateDryrunParameters class. + */ + public CreateOrUpdateDryrunParameters() { + } + + /** + * 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() { + super.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(); + } + } +} 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 new file mode 100644 index 0000000000000..6925187d3f920 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DaprMetadata.java @@ -0,0 +1,106 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; + +/** + * The dapr component metadata. + */ +@Fluent +public final class DaprMetadata { + /* + * Metadata property name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Metadata property value. + */ + @JsonProperty(value = "value") + private String value; + + /* + * The secret name where dapr could get value + */ + @JsonProperty(value = "secretRef") + private String secretRef; + + /** + * 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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} 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 new file mode 100644 index 0000000000000..2f429c189f7e6 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DaprProperties.java @@ -0,0 +1,162 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Indicates some additional properties for dapr client type. + */ +@Fluent +public final class DaprProperties { + /* + * The dapr component version + */ + @JsonProperty(value = "version") + private String version; + + /* + * The dapr component type + */ + @JsonProperty(value = "componentType") + private String componentType; + + /* + * The name of a secret store dapr to retrieve secret + */ + @JsonProperty(value = "secretStoreComponent") + private String secretStoreComponent; + + /* + * Additional dapr metadata + */ + @JsonProperty(value = "metadata") + private List metadata; + + /* + * The dapr component scopes + */ + @JsonProperty(value = "scopes") + private List scopes; + + /** + * 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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (metadata() != null) { + metadata().forEach(e -> e.validate()); + } + } +} 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 new file mode 100644 index 0000000000000..f29ce76fcfbdc --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DatabaseAadAuthInfo.java @@ -0,0 +1,54 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; + +/** + * The extra auth info required by Database AAD authentication. + */ +@Fluent +public class DatabaseAadAuthInfo { + /* + * Username created in the database which is mapped to a user in AAD. + */ + @JsonProperty(value = "userName") + 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() { + } +} 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 new file mode 100644 index 0000000000000..3161a664bf08e --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DeleteOrUpdateBehavior.java @@ -0,0 +1,53 @@ +// 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 com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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 new file mode 100644 index 0000000000000..63e1cc45728c6 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunActionName.java @@ -0,0 +1,48 @@ +// 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 com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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 new file mode 100644 index 0000000000000..5ed00deae3a99 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunList.java @@ -0,0 +1,85 @@ +// 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.resourcemanager.servicelinker.fluent.models.DryrunResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The list of dryrun. + */ +@Fluent +public final class DryrunList { + /* + * The link used to get the next page of dryrun list. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * The list of dryrun. + */ + @JsonProperty(value = "value") + 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()); + } + } +} 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 new file mode 100644 index 0000000000000..b86cd4c226bb5 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunOperationPreview.java @@ -0,0 +1,163 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; + +/** + * The preview of the operations for creation. + */ +@Fluent +public final class DryrunOperationPreview { + /* + * The operation name + */ + @JsonProperty(value = "name") + private String name; + + /* + * The operation type + */ + @JsonProperty(value = "operationType") + private DryrunPreviewOperationType operationType; + + /* + * The description of the operation + */ + @JsonProperty(value = "description") + private String description; + + /* + * The action defined by RBAC, refer + * https://docs.microsoft.com/azure/role-based-access-control/role-definitions#actions-format + */ + @JsonProperty(value = "action") + private String action; + + /* + * The scope of the operation, refer https://docs.microsoft.com/azure/role-based-access-control/scope-overview + */ + @JsonProperty(value = "scope") + 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() { + } +} 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 new file mode 100644 index 0000000000000..780a8f96e8c5b --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunParameters.java @@ -0,0 +1,37 @@ +// 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.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The parameters of the dryrun. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "actionName", + defaultImpl = DryrunParameters.class) +@JsonTypeName("DryrunParameters") +@JsonSubTypes({ @JsonSubTypes.Type(name = "createOrUpdate", value = CreateOrUpdateDryrunParameters.class) }) +@Immutable +public class DryrunParameters { + /** + * Creates an instance of DryrunParameters class. + */ + public DryrunParameters() { + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} 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 new file mode 100644 index 0000000000000..e20505612c42f --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunPatch.java @@ -0,0 +1,98 @@ +// 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.resourcemanager.servicelinker.fluent.models.DryrunProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * a dryrun job to be updated. + */ +@Fluent +public final class DryrunPatch { + /* + * The properties of the dryrun job. + */ + @JsonProperty(value = "properties") + 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(); + } + } +} 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 new file mode 100644 index 0000000000000..d6ea36704a313 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunPrerequisiteResult.java @@ -0,0 +1,39 @@ +// 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.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * A result of dryrun. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "type", + defaultImpl = DryrunPrerequisiteResult.class) +@JsonTypeName("DryrunPrerequisiteResult") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "basicError", value = BasicErrorDryrunPrerequisiteResult.class), + @JsonSubTypes.Type(name = "permissionsMissing", value = PermissionsMissingDryrunPrerequisiteResult.class) }) +@Immutable +public class DryrunPrerequisiteResult { + /** + * Creates an instance of DryrunPrerequisiteResult class. + */ + public DryrunPrerequisiteResult() { + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} 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 new file mode 100644 index 0000000000000..a6543d6aad7a1 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunPrerequisiteResultType.java @@ -0,0 +1,53 @@ +// 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 com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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 new file mode 100644 index 0000000000000..1770b7393850a --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunPreviewOperationType.java @@ -0,0 +1,58 @@ +// 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 com.fasterxml.jackson.annotation.JsonCreator; +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. + */ + @JsonCreator + 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 new file mode 100644 index 0000000000000..40aa6e2c091f0 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/DryrunResource.java @@ -0,0 +1,212 @@ +// 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/FirewallRules.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/FirewallRules.java new file mode 100644 index 0000000000000..fef5467f36eac --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/FirewallRules.java @@ -0,0 +1,113 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Target service's firewall rules. to allow connections from source service. + */ +@Fluent +public final class FirewallRules { + /* + * 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. + */ + @JsonProperty(value = "ipRanges") + private List ipRanges; + + /* + * Allow Azure services to access the target service if true. + */ + @JsonProperty(value = "azureServices") + 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. + */ + @JsonProperty(value = "callerClientIP") + 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() { + } +} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/KeyVaultSecretReferenceSecretInfo.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/KeyVaultSecretReferenceSecretInfo.java index e3ff01f8b65e0..b859430d5a51d 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/KeyVaultSecretReferenceSecretInfo.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/KeyVaultSecretReferenceSecretInfo.java @@ -29,9 +29,15 @@ public final class KeyVaultSecretReferenceSecretInfo extends SecretInfoBase { @JsonProperty(value = "version") private String version; + /** + * Creates an instance of KeyVaultSecretReferenceSecretInfo class. + */ + public KeyVaultSecretReferenceSecretInfo() { + } + /** * Get the name property: Name of the Key Vault secret. - * + * * @return the name value. */ public String name() { @@ -40,7 +46,7 @@ public String name() { /** * Set the name property: Name of the Key Vault secret. - * + * * @param name the name value to set. * @return the KeyVaultSecretReferenceSecretInfo object itself. */ @@ -51,7 +57,7 @@ public KeyVaultSecretReferenceSecretInfo withName(String name) { /** * Get the version property: Version of the Key Vault secret. - * + * * @return the version value. */ public String version() { @@ -60,7 +66,7 @@ public String version() { /** * Set the version property: Version of the Key Vault secret. - * + * * @param version the version value to set. * @return the KeyVaultSecretReferenceSecretInfo object itself. */ @@ -71,7 +77,7 @@ public KeyVaultSecretReferenceSecretInfo withVersion(String version) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/KeyVaultSecretUriSecretInfo.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/KeyVaultSecretUriSecretInfo.java index c0d3e6cd3c9af..7944abd9aaef6 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/KeyVaultSecretUriSecretInfo.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/KeyVaultSecretUriSecretInfo.java @@ -23,9 +23,15 @@ public final class KeyVaultSecretUriSecretInfo extends SecretInfoBase { @JsonProperty(value = "value") private String value; + /** + * Creates an instance of KeyVaultSecretUriSecretInfo class. + */ + public KeyVaultSecretUriSecretInfo() { + } + /** * Get the value property: URI to the keyvault secret. - * + * * @return the value value. */ public String value() { @@ -34,7 +40,7 @@ public String value() { /** * Set the value property: URI to the keyvault secret. - * + * * @param value the value value to set. * @return the KeyVaultSecretUriSecretInfo object itself. */ @@ -45,7 +51,7 @@ public KeyVaultSecretUriSecretInfo withValue(String value) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 1328a8126e437..ac6f223610199 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 @@ -8,7 +8,9 @@ import com.azure.resourcemanager.servicelinker.fluent.models.LinkerProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** A linker to be updated. */ +/** + * A Linker to be updated. + */ @Fluent public final class LinkerPatch { /* @@ -17,9 +19,15 @@ public final class LinkerPatch { @JsonProperty(value = "properties") private LinkerProperties innerProperties; + /** + * Creates an instance of LinkerPatch class. + */ + public LinkerPatch() { + } + /** * Get the innerProperties property: Linker properties. - * + * * @return the innerProperties value. */ private LinkerProperties innerProperties() { @@ -28,7 +36,7 @@ private LinkerProperties innerProperties() { /** * Get the targetService property: The target service properties. - * + * * @return the targetService value. */ public TargetServiceBase targetService() { @@ -37,7 +45,7 @@ public TargetServiceBase targetService() { /** * Set the targetService property: The target service properties. - * + * * @param targetService the targetService value to set. * @return the LinkerPatch object itself. */ @@ -51,7 +59,7 @@ public LinkerPatch withTargetService(TargetServiceBase targetService) { /** * Get the authInfo property: The authentication type. - * + * * @return the authInfo value. */ public AuthInfoBase authInfo() { @@ -60,7 +68,7 @@ public AuthInfoBase authInfo() { /** * Set the authInfo property: The authentication type. - * + * * @param authInfo the authInfo value to set. * @return the LinkerPatch object itself. */ @@ -74,7 +82,7 @@ public LinkerPatch withAuthInfo(AuthInfoBase authInfo) { /** * Get the clientType property: The application client type. - * + * * @return the clientType value. */ public ClientType clientType() { @@ -83,7 +91,7 @@ public ClientType clientType() { /** * Set the clientType property: The application client type. - * + * * @param clientType the clientType value to set. * @return the LinkerPatch object itself. */ @@ -97,7 +105,7 @@ public LinkerPatch withClientType(ClientType clientType) { /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public String provisioningState() { @@ -106,7 +114,7 @@ public String provisioningState() { /** * Get the vNetSolution property: The VNet solution. - * + * * @return the vNetSolution value. */ public VNetSolution vNetSolution() { @@ -115,7 +123,7 @@ public VNetSolution vNetSolution() { /** * Set the vNetSolution property: The VNet solution. - * + * * @param vNetSolution the vNetSolution value to set. * @return the LinkerPatch object itself. */ @@ -129,7 +137,7 @@ public LinkerPatch withVNetSolution(VNetSolution vNetSolution) { /** * Get the secretStore property: An option to store secret value in secure place. - * + * * @return the secretStore value. */ public SecretStore secretStore() { @@ -138,7 +146,7 @@ public SecretStore secretStore() { /** * Set the secretStore property: An option to store secret value in secure place. - * + * * @param secretStore the secretStore value to set. * @return the LinkerPatch object itself. */ @@ -152,7 +160,7 @@ public LinkerPatch withSecretStore(SecretStore secretStore) { /** * Get the scope property: connection scope in source service. - * + * * @return the scope value. */ public String scope() { @@ -161,7 +169,7 @@ public String scope() { /** * Set the scope property: connection scope in source service. - * + * * @param scope the scope value to set. * @return the LinkerPatch object itself. */ @@ -173,9 +181,57 @@ 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. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { 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 c98ee1fd3c031..713d3b44482c3 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 @@ -9,343 +9,473 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.servicelinker.fluent.models.LinkerResourceInner; -/** An immutable client-side representation of LinkerResource. */ +/** + * An immutable client-side representation of LinkerResource. + */ public interface LinkerResource { /** * 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: The system data. - * + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * * @return the systemData value. */ SystemData systemData(); /** * Gets the targetService property: The target service properties. - * + * * @return the targetService value. */ TargetServiceBase targetService(); /** * Gets the authInfo property: The authentication type. - * + * * @return the authInfo value. */ AuthInfoBase authInfo(); /** * Gets the clientType property: The application client type. - * + * * @return the clientType value. */ ClientType clientType(); /** * Gets the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ String provisioningState(); /** * Gets the vNetSolution property: The VNet solution. - * + * * @return the vNetSolution value. */ VNetSolution vNetSolution(); /** * Gets the secretStore property: An option to store secret value in secure place. - * + * * @return the secretStore value. */ SecretStore secretStore(); /** * Gets the scope property: connection scope in source service. - * + * * @return the scope value. */ 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 name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + /** * Gets the inner com.azure.resourcemanager.servicelinker.fluent.models.LinkerResourceInner object. - * + * * @return the inner object. */ LinkerResourceInner innerModel(); - /** The entirety of the LinkerResource definition. */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithScopeStage, DefinitionStages.WithCreate { + /** + * The entirety of the LinkerResource definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The LinkerResource definition stages. */ + + /** + * The LinkerResource definition stages. + */ interface DefinitionStages { - /** The first stage of the LinkerResource definition. */ - interface Blank extends WithScopeStage { + /** + * The first stage of the LinkerResource definition. + */ + interface Blank extends WithParentResource { } - /** The stage of the LinkerResource definition allowing to specify parent resource. */ - interface WithScopeStage { + + /** + * The stage of the LinkerResource definition allowing to specify parent resource. + */ + interface WithParentResource { /** - * Specifies resourceUri. - * - * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. + * 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 withExistingResourceUri(String resourceUri); + WithCreate withExistingLocation(String subscriptionId, String resourceGroupName, String location); } + /** * The stage of the LinkerResource 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.WithTargetService, - DefinitionStages.WithAuthInfo, - DefinitionStages.WithClientType, - DefinitionStages.WithVNetSolution, - DefinitionStages.WithSecretStore, - DefinitionStages.WithScope { + extends DefinitionStages.WithTargetService, DefinitionStages.WithAuthInfo, DefinitionStages.WithClientType, + DefinitionStages.WithVNetSolution, DefinitionStages.WithSecretStore, DefinitionStages.WithScope, + DefinitionStages.WithPublicNetworkSolution, DefinitionStages.WithConfigurationInfo { /** * Executes the create request. - * + * * @return the created resource. */ LinkerResource create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ LinkerResource create(Context context); } - /** The stage of the LinkerResource definition allowing to specify targetService. */ + + /** + * The stage of the LinkerResource definition allowing to specify targetService. + */ interface WithTargetService { /** * Specifies the targetService property: The target service properties. - * + * * @param targetService The target service properties. * @return the next definition stage. */ WithCreate withTargetService(TargetServiceBase targetService); } - /** The stage of the LinkerResource definition allowing to specify authInfo. */ + + /** + * The stage of the LinkerResource definition allowing to specify authInfo. + */ interface WithAuthInfo { /** * Specifies the authInfo property: The authentication type.. - * + * * @param authInfo The authentication type. * @return the next definition stage. */ WithCreate withAuthInfo(AuthInfoBase authInfo); } - /** The stage of the LinkerResource definition allowing to specify clientType. */ + + /** + * The stage of the LinkerResource definition allowing to specify clientType. + */ interface WithClientType { /** * Specifies the clientType property: The application client type. - * + * * @param clientType The application client type. * @return the next definition stage. */ WithCreate withClientType(ClientType clientType); } - /** The stage of the LinkerResource definition allowing to specify vNetSolution. */ + + /** + * The stage of the LinkerResource definition allowing to specify vNetSolution. + */ interface WithVNetSolution { /** * Specifies the vNetSolution property: The VNet solution.. - * + * * @param vNetSolution The VNet solution. * @return the next definition stage. */ WithCreate withVNetSolution(VNetSolution vNetSolution); } - /** The stage of the LinkerResource definition allowing to specify secretStore. */ + + /** + * The stage of the LinkerResource definition allowing to specify secretStore. + */ interface WithSecretStore { /** * Specifies the secretStore property: An option to store secret value in secure place. - * + * * @param secretStore An option to store secret value in secure place. * @return the next definition stage. */ WithCreate withSecretStore(SecretStore secretStore); } - /** The stage of the LinkerResource definition allowing to specify scope. */ + + /** + * The stage of the LinkerResource definition allowing to specify scope. + */ interface WithScope { /** * Specifies the scope property: connection scope in source service.. - * + * * @param scope connection scope in source service. * @return the next definition stage. */ 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); + } } + /** * Begins update for the LinkerResource resource. - * + * * @return the stage of resource update. */ LinkerResource.Update update(); - /** The template for LinkerResource update. */ - interface Update - extends UpdateStages.WithTargetService, - UpdateStages.WithAuthInfo, - UpdateStages.WithClientType, - UpdateStages.WithVNetSolution, - UpdateStages.WithSecretStore, - UpdateStages.WithScope { + /** + * The template for LinkerResource update. + */ + interface Update extends UpdateStages.WithTargetService, UpdateStages.WithAuthInfo, UpdateStages.WithClientType, + UpdateStages.WithVNetSolution, UpdateStages.WithSecretStore, UpdateStages.WithScope, + UpdateStages.WithPublicNetworkSolution, UpdateStages.WithConfigurationInfo { /** * Executes the update request. - * + * * @return the updated resource. */ LinkerResource apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ LinkerResource apply(Context context); } - /** The LinkerResource update stages. */ + + /** + * The LinkerResource update stages. + */ interface UpdateStages { - /** The stage of the LinkerResource update allowing to specify targetService. */ + /** + * The stage of the LinkerResource update allowing to specify targetService. + */ interface WithTargetService { /** * Specifies the targetService property: The target service properties. - * + * * @param targetService The target service properties. * @return the next definition stage. */ Update withTargetService(TargetServiceBase targetService); } - /** The stage of the LinkerResource update allowing to specify authInfo. */ + + /** + * The stage of the LinkerResource update allowing to specify authInfo. + */ interface WithAuthInfo { /** * Specifies the authInfo property: The authentication type.. - * + * * @param authInfo The authentication type. * @return the next definition stage. */ Update withAuthInfo(AuthInfoBase authInfo); } - /** The stage of the LinkerResource update allowing to specify clientType. */ + + /** + * The stage of the LinkerResource update allowing to specify clientType. + */ interface WithClientType { /** * Specifies the clientType property: The application client type. - * + * * @param clientType The application client type. * @return the next definition stage. */ Update withClientType(ClientType clientType); } - /** The stage of the LinkerResource update allowing to specify vNetSolution. */ + + /** + * The stage of the LinkerResource update allowing to specify vNetSolution. + */ interface WithVNetSolution { /** * Specifies the vNetSolution property: The VNet solution.. - * + * * @param vNetSolution The VNet solution. * @return the next definition stage. */ Update withVNetSolution(VNetSolution vNetSolution); } - /** The stage of the LinkerResource update allowing to specify secretStore. */ + + /** + * The stage of the LinkerResource update allowing to specify secretStore. + */ interface WithSecretStore { /** * Specifies the secretStore property: An option to store secret value in secure place. - * + * * @param secretStore An option to store secret value in secure place. * @return the next definition stage. */ Update withSecretStore(SecretStore secretStore); } - /** The stage of the LinkerResource update allowing to specify scope. */ + + /** + * The stage of the LinkerResource update allowing to specify scope. + */ interface WithScope { /** * Specifies the scope property: connection scope in source service.. - * + * * @param scope connection scope in source service. * @return the next definition stage. */ 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); + } } + /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ LinkerResource refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ LinkerResource refresh(Context context); /** - * Validate a link. - * + * Validate a Connector. + * * @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 link. - * + * Validate a Connector. + * * @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. - * + * Generate configurations for a Connector. + * + * @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. + * @return configurations for source resource, include appSettings, connectionString and serviceBindings along with + * {@link Response}. */ - SourceConfigurationResult listConfigurations(); + Response generateConfigurationsWithResponse(ConfigurationInfo parameters, Context context); /** - * list source configurations for a linker. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. + * Generate configurations for a Connector. + * * @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}. + * @return configurations for source resource, include appSettings, connectionString and serviceBindings. */ - Response listConfigurationsWithResponse(Context context); + ConfigurationResult generateConfigurations(); } 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 745ca32af7063..4792f1e6436f3 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 @@ -7,12 +7,16 @@ 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 Linkers. */ +/** + * Resource collection API of Linkers. + */ public interface Linkers { /** - * Returns list of Linkers which connects to the resource. - * + * Returns list of Linkers which connects to the resource. which supports to config both application and target + * service during the resource provision. + * * @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. @@ -22,8 +26,9 @@ public interface Linkers { PagedIterable list(String resourceUri); /** - * Returns list of Linkers which connects to the resource. - * + * Returns list of Linkers which connects to the resource. which supports to config both application and target + * service during the resource provision. + * * @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. @@ -35,153 +40,156 @@ public interface Linkers { /** * Returns Linker resource for a given name. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker 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. + * @return linker of source and target resource along with {@link Response}. */ - LinkerResource get(String resourceUri, String linkerName); + Response getWithResponse(String resourceUri, String linkerName, Context context); /** * Returns Linker resource for a given name. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker 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}. + * @return linker of source and target resource. */ - Response getWithResponse(String resourceUri, String linkerName, Context context); + LinkerResource get(String resourceUri, String linkerName); /** - * Delete a link. - * + * 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. + * @param parameters Linker 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. */ - void deleteByResourceGroup(String resourceUri, String linkerName); + LinkerResource createOrUpdate(String resourceUri, String linkerName, LinkerResourceInner parameters); /** - * Delete a link. - * + * 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. + * @param parameters Linker 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. */ - void delete(String resourceUri, String linkerName, Context context); + LinkerResource createOrUpdate(String resourceUri, String linkerName, LinkerResourceInner parameters, + Context context); /** - * Validate a link. - * + * Delete 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 the validation operation result for a linker. */ - ValidateOperationResult validate(String resourceUri, String linkerName); + void deleteByResourceGroup(String resourceUri, String linkerName); /** - * Validate a link. - * + * Delete a Linker. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker 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 resourceUri, String linkerName, Context context); + void delete(String resourceUri, String linkerName, Context context); /** - * list source configurations for a linker. - * + * Operation to update an existing Linker. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. + * @param parameters Linker 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 configurations for source resource, include appSettings, connectionString and serviceBindings. + * @return linker of source and target resource. */ - SourceConfigurationResult listConfigurations(String resourceUri, String linkerName); + LinkerResource update(String resourceUri, String linkerName, LinkerPatch parameters); /** - * list source configurations for a linker. - * + * Operation to update an existing Linker. + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. + * @param parameters Linker 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 configurations for source resource, include appSettings, connectionString and serviceBindings along with - * {@link Response}. + * @return linker of source and target resource. */ - Response listConfigurationsWithResponse( - String resourceUri, String linkerName, Context context); + LinkerResource update(String resourceUri, String linkerName, LinkerPatch parameters, Context context); /** - * Returns Linker resource for a given name. - * - * @param id the resource ID. + * Validate 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 linker of source and target resource along with {@link Response}. + * @return the validation operation result for a Linker. */ - LinkerResource getById(String id); + ValidateOperationResult validate(String resourceUri, String linkerName); /** - * Returns Linker resource for a given name. - * - * @param id the resource ID. + * Validate a Linker. + * + * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. + * @param linkerName The name Linker 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}. + * @return the validation operation result for a Linker. */ - Response getByIdWithResponse(String id, Context context); + ValidateOperationResult validate(String resourceUri, String linkerName, Context context); /** - * Delete a link. - * - * @param id the resource ID. + * 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. + * @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}. */ - void deleteById(String id); + Response listConfigurationsWithResponse(String resourceUri, String linkerName, + Context context); /** - * Delete a link. - * - * @param id the resource ID. - * @param context The context to associate with this operation. + * 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. * @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. */ - void deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new LinkerResource resource. - * - * @param name resource name. - * @return the first stage of the new LinkerResource definition. - */ - LinkerResource.DefinitionStages.Blank define(String name); + ConfigurationResult listConfigurations(String resourceUri, String linkerName); } 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 new file mode 100644 index 0000000000000..c9c8df99e4f1d --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/LinkersOperations.java @@ -0,0 +1,169 @@ +// 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); +} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/Operation.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/Operation.java index e68e7d7d00dd1..2cc62581a38e3 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/Operation.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/Operation.java @@ -6,12 +6,14 @@ import com.azure.resourcemanager.servicelinker.fluent.models.OperationInner; -/** An immutable client-side representation of Operation. */ +/** + * An immutable client-side representation of Operation. + */ public interface Operation { /** * Gets the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". - * + * * @return the name value. */ String name(); @@ -19,14 +21,14 @@ public interface Operation { /** * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane * operations and "false" for ARM/control-plane operations. - * + * * @return the isDataAction value. */ Boolean isDataAction(); /** * Gets the display property: Localized display information for this particular operation. - * + * * @return the display value. */ OperationDisplay display(); @@ -34,7 +36,7 @@ public interface Operation { /** * Gets the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and * audit logs UX. Default value is "user,system". - * + * * @return the origin value. */ Origin origin(); @@ -42,14 +44,14 @@ public interface Operation { /** * Gets the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal * only APIs. - * + * * @return the actionType value. */ ActionType actionType(); /** * Gets the inner com.azure.resourcemanager.servicelinker.fluent.models.OperationInner object. - * + * * @return the inner object. */ OperationInner innerModel(); diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/OperationDisplay.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/OperationDisplay.java index 7def6a8572eda..3ebeb4b06f209 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/OperationDisplay.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/OperationDisplay.java @@ -7,42 +7,48 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Localized display information for this particular operation. */ +/** + * Localized display information for this particular operation. + */ @Immutable public final class OperationDisplay { /* - * The localized friendly form of the resource provider name, e.g. - * "Microsoft Monitoring Insights" or "Microsoft Compute". + * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft + * Compute". */ @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY) private String provider; /* - * The localized friendly name of the resource type related to this - * operation. E.g. "Virtual Machines" or "Job Schedule Collections". + * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job + * Schedule Collections". */ @JsonProperty(value = "resource", access = JsonProperty.Access.WRITE_ONLY) private String resource; /* - * The concise, localized friendly name for the operation; suitable for - * dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual - * Machine". + * The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual + * Machine", "Restart Virtual Machine". */ @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) private String operation; /* - * The short, localized friendly description of the operation; suitable for - * tool tips and detailed views. + * The short, localized friendly description of the operation; suitable for tool tips and detailed views. */ @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) private String description; + /** + * Creates an instance of OperationDisplay class. + */ + public OperationDisplay() { + } + /** * Get the provider property: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring * Insights" or "Microsoft Compute". - * + * * @return the provider value. */ public String provider() { @@ -52,7 +58,7 @@ public String provider() { /** * Get the resource property: The localized friendly name of the resource type related to this operation. E.g. * "Virtual Machines" or "Job Schedule Collections". - * + * * @return the resource value. */ public String resource() { @@ -62,7 +68,7 @@ public String resource() { /** * Get the operation property: The concise, localized friendly name for the operation; suitable for dropdowns. E.g. * "Create or Update Virtual Machine", "Restart Virtual Machine". - * + * * @return the operation value. */ public String operation() { @@ -72,7 +78,7 @@ public String operation() { /** * Get the description property: The short, localized friendly description of the operation; suitable for tool tips * and detailed views. - * + * * @return the description value. */ public String description() { @@ -81,7 +87,7 @@ public String description() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/OperationListResult.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/OperationListResult.java index e67087ab4762f..8395d06ee7a78 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/OperationListResult.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/OperationListResult.java @@ -10,8 +10,8 @@ import java.util.List; /** - * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of - * results. + * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set + * of results. */ @Immutable public final class OperationListResult { @@ -27,9 +27,15 @@ public final class OperationListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** + * Creates an instance of OperationListResult class. + */ + public OperationListResult() { + } + /** * Get the value property: List of operations supported by the resource provider. - * + * * @return the value value. */ public List value() { @@ -38,7 +44,7 @@ public List value() { /** * Get the nextLink property: URL to get the next set of operation list results (if there are any). - * + * * @return the nextLink value. */ public String nextLink() { @@ -47,7 +53,7 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/Operations.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/Operations.java index 2ed86c9c352db..957030b39b738 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/Operations.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/Operations.java @@ -7,27 +7,29 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of Operations. */ +/** + * Resource collection API of Operations. + */ public interface Operations { /** * Lists the available ServiceLinker REST API operations. - * + * * @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 list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ PagedIterable list(); /** * Lists the available ServiceLinker REST API operations. - * + * * @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 list of REST API operations supported by an Azure Resource Provider as paginated response with {@link - * PagedIterable}. + * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with + * {@link PagedIterable}. */ PagedIterable list(Context context); } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/Origin.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/Origin.java index 4b62b0bbe7c92..fcea182be72bd 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/Origin.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/Origin.java @@ -8,20 +8,38 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for Origin. */ +/** + * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value + * is "user,system". + */ public final class Origin extends ExpandableStringEnum { - /** Static value user for Origin. */ + /** + * Static value user for Origin. + */ public static final Origin USER = fromString("user"); - /** Static value system for Origin. */ + /** + * Static value system for Origin. + */ public static final Origin SYSTEM = fromString("system"); - /** Static value user,system for Origin. */ + /** + * Static value user,system for Origin. + */ public static final Origin USER_SYSTEM = fromString("user,system"); + /** + * Creates a new instance of Origin value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Origin() { + } + /** * Creates or finds a Origin from its string representation. - * + * * @param name a name to look for. * @return the corresponding Origin. */ @@ -32,7 +50,7 @@ public static Origin fromString(String name) { /** * Gets known Origin values. - * + * * @return known Origin values. */ public static Collection values() { 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 new file mode 100644 index 0000000000000..83a2770b075ac --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/PermissionsMissingDryrunPrerequisiteResult.java @@ -0,0 +1,113 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** + * The represent of missing permissions. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("permissionsMissing") +@Fluent +public final class PermissionsMissingDryrunPrerequisiteResult extends DryrunPrerequisiteResult { + /* + * The permission scope + */ + @JsonProperty(value = "scope") + private String scope; + + /* + * The permission list + */ + @JsonProperty(value = "permissions") + private List permissions; + + /* + * The recommended role to resolve permissions missing + */ + @JsonProperty(value = "recommendedRole") + private String recommendedRole; + + /** + * Creates an instance of PermissionsMissingDryrunPrerequisiteResult class. + */ + public PermissionsMissingDryrunPrerequisiteResult() { + } + + /** + * 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() { + super.validate(); + } +} 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 new file mode 100644 index 0000000000000..cef4fc9ea9db1 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/PublicNetworkSolution.java @@ -0,0 +1,116 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; + +/** + * Indicates public network solution, include firewall rules. + */ +@Fluent +public final class PublicNetworkSolution { + /* + * Indicates whether to clean up previous operation(such as firewall rules) when Linker is updating or deleting + */ + @JsonProperty(value = "deleteOrUpdateBehavior") + 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. + */ + @JsonProperty(value = "action") + private ActionType action; + + /* + * Describe firewall rules of target service to make sure source application could connect to the target. + */ + @JsonProperty(value = "firewallRules") + 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(); + } + } +} diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/LinkerList.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ResourceList.java similarity index 69% rename from sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/LinkerList.java rename to sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ResourceList.java index d3b63c7c0ba6e..a24d4b169e693 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/LinkerList.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ResourceList.java @@ -9,11 +9,13 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The list of Linker. */ +/** + * The list of Linker. + */ @Fluent -public final class LinkerList { +public final class ResourceList { /* - * The link used to get the next page of Linker list. + * The Linker used to get the next page of Linker list. */ @JsonProperty(value = "nextLink") private String nextLink; @@ -25,8 +27,14 @@ public final class LinkerList { private List value; /** - * Get the nextLink property: The link used to get the next page of Linker list. - * + * Creates an instance of ResourceList class. + */ + public ResourceList() { + } + + /** + * Get the nextLink property: The Linker used to get the next page of Linker list. + * * @return the nextLink value. */ public String nextLink() { @@ -34,19 +42,19 @@ public String nextLink() { } /** - * Set the nextLink property: The link used to get the next page of Linker list. - * + * Set the nextLink property: The Linker used to get the next page of Linker list. + * * @param nextLink the nextLink value to set. - * @return the LinkerList object itself. + * @return the ResourceList object itself. */ - public LinkerList withNextLink(String nextLink) { + public ResourceList withNextLink(String nextLink) { this.nextLink = nextLink; return this; } /** * Get the value property: The list of Linkers. - * + * * @return the value value. */ public List value() { @@ -55,18 +63,18 @@ public List value() { /** * Set the value property: The list of Linkers. - * + * * @param value the value value to set. - * @return the LinkerList object itself. + * @return the ResourceList object itself. */ - public LinkerList withValue(List value) { + public ResourceList withValue(List value) { this.value = value; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { 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 a3c86beaa5312..eee8774809007 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 @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The authentication info when authType is secret. */ +/** + * The authentication info when authType is secret. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") @JsonTypeName("secret") @Fluent @@ -26,9 +28,15 @@ public final class SecretAuthInfo extends AuthInfoBase { @JsonProperty(value = "secretInfo") private SecretInfoBase secretInfo; + /** + * Creates an instance of SecretAuthInfo class. + */ + public SecretAuthInfo() { + } + /** * Get the name property: Username or account name for secret auth. - * + * * @return the name value. */ public String name() { @@ -37,7 +45,7 @@ public String name() { /** * Set the name property: Username or account name for secret auth. - * + * * @param name the name value to set. * @return the SecretAuthInfo object itself. */ @@ -48,7 +56,7 @@ public SecretAuthInfo withName(String name) { /** * Get the secretInfo property: Password or key vault secret for secret auth. - * + * * @return the secretInfo value. */ public SecretInfoBase secretInfo() { @@ -57,7 +65,7 @@ public SecretInfoBase secretInfo() { /** * Set the secretInfo property: Password or key vault secret for secret auth. - * + * * @param secretInfo the secretInfo value to set. * @return the SecretAuthInfo object itself. */ @@ -68,7 +76,7 @@ public SecretAuthInfo withSecretInfo(SecretInfoBase secretInfo) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SecretInfoBase.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SecretInfoBase.java index 1be6c07d07818..9452239a60da3 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SecretInfoBase.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SecretInfoBase.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The secret info. */ +/** + * The secret info. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -19,13 +21,18 @@ @JsonSubTypes({ @JsonSubTypes.Type(name = "rawValue", value = ValueSecretInfo.class), @JsonSubTypes.Type(name = "keyVaultSecretReference", value = KeyVaultSecretReferenceSecretInfo.class), - @JsonSubTypes.Type(name = "keyVaultSecretUri", value = KeyVaultSecretUriSecretInfo.class) -}) + @JsonSubTypes.Type(name = "keyVaultSecretUri", value = KeyVaultSecretUriSecretInfo.class) }) @Immutable public class SecretInfoBase { + /** + * Creates an instance of SecretInfoBase class. + */ + public SecretInfoBase() { + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { 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 626bbf8763302..4566d6e8a7d8c 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** An option to store secret value in secure place. */ +/** + * An option to store secret value in secure place. + */ @Fluent public final class SecretStore { /* @@ -16,9 +18,21 @@ public final class SecretStore { @JsonProperty(value = "keyVaultId") private String keyVaultId; + /* + * The key vault secret name to store secret, only valid when storing one secret + */ + @JsonProperty(value = "keyVaultSecretName") + private String keyVaultSecretName; + + /** + * Creates an instance of SecretStore class. + */ + public SecretStore() { + } + /** * Get the keyVaultId property: The key vault id to store secret. - * + * * @return the keyVaultId value. */ public String keyVaultId() { @@ -27,7 +41,7 @@ public String keyVaultId() { /** * Set the keyVaultId property: The key vault id to store secret. - * + * * @param keyVaultId the keyVaultId value to set. * @return the SecretStore object itself. */ @@ -36,9 +50,31 @@ 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. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SecretType.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SecretType.java index 4d9a05cf41f7c..dbb7ba0cc163d 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SecretType.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SecretType.java @@ -8,20 +8,37 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SecretType. */ +/** + * The secret type. + */ public final class SecretType extends ExpandableStringEnum { - /** Static value rawValue for SecretType. */ + /** + * Static value rawValue for SecretType. + */ public static final SecretType RAW_VALUE = fromString("rawValue"); - /** Static value keyVaultSecretUri for SecretType. */ + /** + * Static value keyVaultSecretUri for SecretType. + */ public static final SecretType KEY_VAULT_SECRET_URI = fromString("keyVaultSecretUri"); - /** Static value keyVaultSecretReference for SecretType. */ + /** + * Static value keyVaultSecretReference for SecretType. + */ public static final SecretType KEY_VAULT_SECRET_REFERENCE = fromString("keyVaultSecretReference"); + /** + * Creates a new instance of SecretType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SecretType() { + } + /** * Creates or finds a SecretType from its string representation. - * + * * @param name a name to look for. * @return the corresponding SecretType. */ @@ -32,7 +49,7 @@ public static SecretType fromString(String name) { /** * Gets known SecretType values. - * + * * @return known SecretType values. */ public static Collection values() { 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 new file mode 100644 index 0000000000000..b9fe804b5c355 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SelfHostedServer.java @@ -0,0 +1,60 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * The service properties when target service type is SelfHostedServer. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") +@JsonTypeName("SelfHostedServer") +@Fluent +public final class SelfHostedServer extends TargetServiceBase { + /* + * The endpoint of service. + */ + @JsonProperty(value = "endpoint") + private String endpoint; + + /** + * Creates an instance of SelfHostedServer class. + */ + public SelfHostedServer() { + } + + /** + * 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() { + super.validate(); + } +} 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 dc9e1d46c5726..75f24cd5bce7a 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 @@ -9,8 +9,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; -/** The authentication info when authType is servicePrincipal certificate. */ +/** + * The authentication info when authType is servicePrincipal certificate. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") @JsonTypeName("servicePrincipalCertificate") @Fluent @@ -30,12 +33,30 @@ public final class ServicePrincipalCertificateAuthInfo extends AuthInfoBase { /* * ServicePrincipal certificate for servicePrincipal auth. */ - @JsonProperty(value = "certificate", required = true) + @JsonProperty(value = "certificate") private String certificate; + /* + * Indicates whether to clean up previous operation when Linker is updating or deleting + */ + @JsonProperty(value = "deleteOrUpdateBehavior") + private DeleteOrUpdateBehavior deleteOrUpdateBehavior; + + /* + * Optional, this value specifies the Azure roles to be assigned. Automatically + */ + @JsonProperty(value = "roles") + private List roles; + + /** + * Creates an instance of ServicePrincipalCertificateAuthInfo class. + */ + public ServicePrincipalCertificateAuthInfo() { + } + /** * Get the clientId property: Application clientId for servicePrincipal auth. - * + * * @return the clientId value. */ public String clientId() { @@ -44,7 +65,7 @@ public String clientId() { /** * Set the clientId property: Application clientId for servicePrincipal auth. - * + * * @param clientId the clientId value to set. * @return the ServicePrincipalCertificateAuthInfo object itself. */ @@ -55,7 +76,7 @@ public ServicePrincipalCertificateAuthInfo withClientId(String clientId) { /** * Get the principalId property: Principal Id for servicePrincipal auth. - * + * * @return the principalId value. */ public String principalId() { @@ -64,7 +85,7 @@ public String principalId() { /** * Set the principalId property: Principal Id for servicePrincipal auth. - * + * * @param principalId the principalId value to set. * @return the ServicePrincipalCertificateAuthInfo object itself. */ @@ -75,7 +96,7 @@ public ServicePrincipalCertificateAuthInfo withPrincipalId(String principalId) { /** * Get the certificate property: ServicePrincipal certificate for servicePrincipal auth. - * + * * @return the certificate value. */ public String certificate() { @@ -84,7 +105,7 @@ public String certificate() { /** * Set the certificate property: ServicePrincipal certificate for servicePrincipal auth. - * + * * @param certificate the certificate value to set. * @return the ServicePrincipalCertificateAuthInfo object itself. */ @@ -93,31 +114,68 @@ 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; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (clientId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property clientId in model ServicePrincipalCertificateAuthInfo")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property clientId in model ServicePrincipalCertificateAuthInfo")); } if (principalId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property principalId in model ServicePrincipalCertificateAuthInfo")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property principalId in model ServicePrincipalCertificateAuthInfo")); } if (certificate() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property certificate in model ServicePrincipalCertificateAuthInfo")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property certificate in model ServicePrincipalCertificateAuthInfo")); } } 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 97ccd04b48fce..e970fdd8ef1b3 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 @@ -9,8 +9,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; -/** The authentication info when authType is servicePrincipal secret. */ +/** + * The authentication info when authType is servicePrincipal secret. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") @JsonTypeName("servicePrincipalSecret") @Fluent @@ -30,12 +33,36 @@ public final class ServicePrincipalSecretAuthInfo extends AuthInfoBase { /* * Secret for servicePrincipal auth. */ - @JsonProperty(value = "secret", required = true) + @JsonProperty(value = "secret") private String secret; + /* + * Indicates whether to clean up previous operation when Linker is updating or deleting + */ + @JsonProperty(value = "deleteOrUpdateBehavior") + private DeleteOrUpdateBehavior deleteOrUpdateBehavior; + + /* + * Optional, this value specifies the Azure roles to be assigned. Automatically + */ + @JsonProperty(value = "roles") + private List roles; + + /* + * Username created in the database which is mapped to a user in AAD. + */ + @JsonProperty(value = "userName") + private String username; + + /** + * Creates an instance of ServicePrincipalSecretAuthInfo class. + */ + public ServicePrincipalSecretAuthInfo() { + } + /** * Get the clientId property: ServicePrincipal application clientId for servicePrincipal auth. - * + * * @return the clientId value. */ public String clientId() { @@ -44,7 +71,7 @@ public String clientId() { /** * Set the clientId property: ServicePrincipal application clientId for servicePrincipal auth. - * + * * @param clientId the clientId value to set. * @return the ServicePrincipalSecretAuthInfo object itself. */ @@ -55,7 +82,7 @@ public ServicePrincipalSecretAuthInfo withClientId(String clientId) { /** * Get the principalId property: Principal Id for servicePrincipal auth. - * + * * @return the principalId value. */ public String principalId() { @@ -64,7 +91,7 @@ public String principalId() { /** * Set the principalId property: Principal Id for servicePrincipal auth. - * + * * @param principalId the principalId value to set. * @return the ServicePrincipalSecretAuthInfo object itself. */ @@ -75,7 +102,7 @@ public ServicePrincipalSecretAuthInfo withPrincipalId(String principalId) { /** * Get the secret property: Secret for servicePrincipal auth. - * + * * @return the secret value. */ public String secret() { @@ -84,7 +111,7 @@ public String secret() { /** * Set the secret property: Secret for servicePrincipal auth. - * + * * @param secret the secret value to set. * @return the ServicePrincipalSecretAuthInfo object itself. */ @@ -93,31 +120,87 @@ 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; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override public void validate() { super.validate(); if (clientId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property clientId in model ServicePrincipalSecretAuthInfo")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property clientId in model ServicePrincipalSecretAuthInfo")); } if (principalId() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property principalId in model ServicePrincipalSecretAuthInfo")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property principalId in model ServicePrincipalSecretAuthInfo")); } if (secret() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property secret in model ServicePrincipalSecretAuthInfo")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property secret in model ServicePrincipalSecretAuthInfo")); } } 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 3311bebb78d66..e3baa74915ff5 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** A configuration item for source resource. */ +/** + * A configuration item for source resource. + */ @Fluent public final class SourceConfiguration { /* @@ -22,9 +24,15 @@ public final class SourceConfiguration { @JsonProperty(value = "value") private String value; + /** + * Creates an instance of SourceConfiguration class. + */ + public SourceConfiguration() { + } + /** * Get the name property: The name of setting. - * + * * @return the name value. */ public String name() { @@ -33,7 +41,7 @@ public String name() { /** * Set the name property: The name of setting. - * + * * @param name the name value to set. * @return the SourceConfiguration object itself. */ @@ -44,7 +52,7 @@ public SourceConfiguration withName(String name) { /** * Get the value property: The value of setting. - * + * * @return the value value. */ public String value() { @@ -53,7 +61,7 @@ public String value() { /** * Set the value property: The value of setting. - * + * * @param value the value value to set. * @return the SourceConfiguration object itself. */ @@ -64,7 +72,7 @@ public SourceConfiguration withValue(String value) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { 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 2548428a6cd9d..7af3b44971118 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,18 +4,108 @@ package com.azure.resourcemanager.servicelinker.models; -import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; -/** The authentication info when authType is systemAssignedIdentity. */ +/** + * The authentication info when authType is systemAssignedIdentity. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") @JsonTypeName("systemAssignedIdentity") -@Immutable +@Fluent public final class SystemAssignedIdentityAuthInfo extends AuthInfoBase { + /* + * Indicates whether to clean up previous operation when Linker is updating or deleting + */ + @JsonProperty(value = "deleteOrUpdateBehavior") + private DeleteOrUpdateBehavior deleteOrUpdateBehavior; + + /* + * Optional, this value specifies the Azure role to be assigned + */ + @JsonProperty(value = "roles") + private List roles; + + /* + * Username created in the database which is mapped to a user in AAD. + */ + @JsonProperty(value = "userName") + private String username; + + /** + * Creates an instance of SystemAssignedIdentityAuthInfo class. + */ + public SystemAssignedIdentityAuthInfo() { + } + + /** + * 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; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 1238b95ce7994..a68f42efce71d 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 @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The target service properties. */ +/** + * The target service properties. + */ @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, @@ -19,13 +21,19 @@ @JsonSubTypes({ @JsonSubTypes.Type(name = "AzureResource", value = AzureResource.class), @JsonSubTypes.Type(name = "ConfluentBootstrapServer", value = ConfluentBootstrapServer.class), - @JsonSubTypes.Type(name = "ConfluentSchemaRegistry", value = ConfluentSchemaRegistry.class) -}) + @JsonSubTypes.Type(name = "SelfHostedServer", value = SelfHostedServer.class), + @JsonSubTypes.Type(name = "ConfluentSchemaRegistry", value = ConfluentSchemaRegistry.class) }) @Immutable public class TargetServiceBase { + /** + * Creates an instance of TargetServiceBase class. + */ + public TargetServiceBase() { + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { 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 4d11eaf03f4bc..14693c0afc17d 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 @@ -8,20 +8,42 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for TargetServiceType. */ +/** + * The target service type. + */ public final class TargetServiceType extends ExpandableStringEnum { - /** Static value AzureResource for TargetServiceType. */ + /** + * Static value AzureResource for TargetServiceType. + */ public static final TargetServiceType AZURE_RESOURCE = fromString("AzureResource"); - /** Static value ConfluentBootstrapServer for TargetServiceType. */ + /** + * Static value ConfluentBootstrapServer for TargetServiceType. + */ public static final TargetServiceType CONFLUENT_BOOTSTRAP_SERVER = fromString("ConfluentBootstrapServer"); - /** Static value ConfluentSchemaRegistry for TargetServiceType. */ + /** + * Static value ConfluentSchemaRegistry for TargetServiceType. + */ public static final TargetServiceType CONFLUENT_SCHEMA_REGISTRY = fromString("ConfluentSchemaRegistry"); + /** + * Static value SelfHostedServer for TargetServiceType. + */ + public static final TargetServiceType SELF_HOSTED_SERVER = fromString("SelfHostedServer"); + + /** + * Creates a new instance of TargetServiceType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TargetServiceType() { + } + /** * Creates or finds a TargetServiceType from its string representation. - * + * * @param name a name to look for. * @return the corresponding TargetServiceType. */ @@ -32,7 +54,7 @@ public static TargetServiceType fromString(String name) { /** * Gets known TargetServiceType values. - * + * * @return known TargetServiceType values. */ public static Collection values() { diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/UserAccountAuthInfo.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/UserAccountAuthInfo.java new file mode 100644 index 0000000000000..a9f4af2f0ed56 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/UserAccountAuthInfo.java @@ -0,0 +1,141 @@ +// 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.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** + * The authentication info when authType is user account. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") +@JsonTypeName("userAccount") +@Fluent +public final class UserAccountAuthInfo extends AuthInfoBase { + /* + * Principal Id for user account. + */ + @JsonProperty(value = "principalId") + private String principalId; + + /* + * Indicates whether to clean up previous operation when Linker is updating or deleting + */ + @JsonProperty(value = "deleteOrUpdateBehavior") + private DeleteOrUpdateBehavior deleteOrUpdateBehavior; + + /* + * Optional, this value specifies the Azure roles to be assigned. Automatically + */ + @JsonProperty(value = "roles") + private List roles; + + /* + * Username created in the database which is mapped to a user in AAD. + */ + @JsonProperty(value = "userName") + private String username; + + /** + * Creates an instance of UserAccountAuthInfo class. + */ + public UserAccountAuthInfo() { + } + + /** + * 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; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} 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 d5df511c9e118..52cbafce94905 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 @@ -8,8 +8,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; -/** The authentication info when authType is userAssignedIdentity. */ +/** + * The authentication info when authType is userAssignedIdentity. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") @JsonTypeName("userAssignedIdentity") @Fluent @@ -26,9 +29,33 @@ public final class UserAssignedIdentityAuthInfo extends AuthInfoBase { @JsonProperty(value = "subscriptionId") private String subscriptionId; + /* + * Indicates whether to clean up previous operation when Linker is updating or deleting + */ + @JsonProperty(value = "deleteOrUpdateBehavior") + private DeleteOrUpdateBehavior deleteOrUpdateBehavior; + + /* + * Optional, this value specifies the Azure role to be assigned + */ + @JsonProperty(value = "roles") + private List roles; + + /* + * Username created in the database which is mapped to a user in AAD. + */ + @JsonProperty(value = "userName") + private String username; + + /** + * Creates an instance of UserAssignedIdentityAuthInfo class. + */ + public UserAssignedIdentityAuthInfo() { + } + /** * Get the clientId property: Client Id for userAssignedIdentity. - * + * * @return the clientId value. */ public String clientId() { @@ -37,7 +64,7 @@ public String clientId() { /** * Set the clientId property: Client Id for userAssignedIdentity. - * + * * @param clientId the clientId value to set. * @return the UserAssignedIdentityAuthInfo object itself. */ @@ -48,7 +75,7 @@ public UserAssignedIdentityAuthInfo withClientId(String clientId) { /** * Get the subscriptionId property: Subscription id for userAssignedIdentity. - * + * * @return the subscriptionId value. */ public String subscriptionId() { @@ -57,7 +84,7 @@ public String subscriptionId() { /** * Set the subscriptionId property: Subscription id for userAssignedIdentity. - * + * * @param subscriptionId the subscriptionId value to set. * @return the UserAssignedIdentityAuthInfo object itself. */ @@ -66,9 +93,71 @@ 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; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 dcda963576349..7aabba2810065 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The VNet solution for linker. */ +/** + * The VNet solution for linker. + */ @Fluent public final class VNetSolution { /* @@ -16,9 +18,21 @@ public final class VNetSolution { @JsonProperty(value = "type") private VNetSolutionType type; + /* + * Indicates whether to clean up previous operation when Linker is updating or deleting + */ + @JsonProperty(value = "deleteOrUpdateBehavior") + private DeleteOrUpdateBehavior deleteOrUpdateBehavior; + + /** + * Creates an instance of VNetSolution class. + */ + public VNetSolution() { + } + /** * Get the type property: Type of VNet solution. - * + * * @return the type value. */ public VNetSolutionType type() { @@ -27,7 +41,7 @@ public VNetSolutionType type() { /** * Set the type property: Type of VNet solution. - * + * * @param type the type value to set. * @return the VNetSolution object itself. */ @@ -36,9 +50,31 @@ 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. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/VNetSolutionType.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/VNetSolutionType.java index ed188a96f8a9e..826dd7c6b84fd 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/VNetSolutionType.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/VNetSolutionType.java @@ -8,17 +8,32 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for VNetSolutionType. */ +/** + * Type of VNet solution. + */ public final class VNetSolutionType extends ExpandableStringEnum { - /** Static value serviceEndpoint for VNetSolutionType. */ + /** + * Static value serviceEndpoint for VNetSolutionType. + */ public static final VNetSolutionType SERVICE_ENDPOINT = fromString("serviceEndpoint"); - /** Static value privateLink for VNetSolutionType. */ + /** + * Static value privateLink for VNetSolutionType. + */ public static final VNetSolutionType PRIVATE_LINK = fromString("privateLink"); + /** + * Creates a new instance of VNetSolutionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public VNetSolutionType() { + } + /** * Creates or finds a VNetSolutionType from its string representation. - * + * * @param name a name to look for. * @return the corresponding VNetSolutionType. */ @@ -29,7 +44,7 @@ public static VNetSolutionType fromString(String name) { /** * Gets known VNetSolutionType values. - * + * * @return known VNetSolutionType values. */ public static Collection values() { 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 0f94afd526432..e4635706f4e94 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 @@ -8,81 +8,83 @@ import java.time.OffsetDateTime; import java.util.List; -/** An immutable client-side representation of ValidateOperationResult. */ +/** + * An immutable client-side representation of ValidateOperationResult. + */ public interface ValidateOperationResult { /** - * Gets the resourceId property: Validated linker id. - * + * Gets the resourceId property: Validated Linker id. + * * @return the resourceId value. */ String resourceId(); /** * Gets the status property: Validation operation status. - * + * * @return the status value. */ String status(); /** * Gets the linkerName property: The linker name. - * + * * @return the linkerName value. */ String linkerName(); /** * Gets the isConnectionAvailable property: A boolean value indicating whether the connection is available or not. - * + * * @return the isConnectionAvailable value. */ Boolean isConnectionAvailable(); /** * Gets the reportStartTimeUtc property: The start time of the validation report. - * + * * @return the reportStartTimeUtc value. */ OffsetDateTime reportStartTimeUtc(); /** * Gets the reportEndTimeUtc property: The end time of the validation report. - * + * * @return the reportEndTimeUtc value. */ 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. */ String sourceId(); /** * Gets the targetId property: The resource Id of target service. - * + * * @return the targetId value. */ String targetId(); /** * Gets the authType property: The authentication type. - * + * * @return the authType value. */ AuthType authType(); /** * Gets the validationDetail property: The detail of validation result. - * + * * @return the validationDetail value. */ List validationDetail(); /** * Gets the inner com.azure.resourcemanager.servicelinker.fluent.models.ValidateOperationResultInner object. - * + * * @return the inner object. */ ValidateOperationResultInner innerModel(); 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 5596845415cef..68d2f0ea58a96 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The validation item for a linker. */ +/** + * The validation item for a Linker. + */ @Fluent public final class ValidationResultItem { /* @@ -40,9 +42,15 @@ public final class ValidationResultItem { @JsonProperty(value = "errorCode") private String errorCode; + /** + * Creates an instance of ValidationResultItem class. + */ + public ValidationResultItem() { + } + /** * Get the name property: The validation item name. - * + * * @return the name value. */ public String name() { @@ -51,7 +59,7 @@ public String name() { /** * Set the name property: The validation item name. - * + * * @param name the name value to set. * @return the ValidationResultItem object itself. */ @@ -62,7 +70,7 @@ public ValidationResultItem withName(String name) { /** * Get the description property: The display name of validation item. - * + * * @return the description value. */ public String description() { @@ -71,7 +79,7 @@ public String description() { /** * Set the description property: The display name of validation item. - * + * * @param description the description value to set. * @return the ValidationResultItem object itself. */ @@ -82,7 +90,7 @@ public ValidationResultItem withDescription(String description) { /** * Get the result property: The result of validation. - * + * * @return the result value. */ public ValidationResultStatus result() { @@ -91,7 +99,7 @@ public ValidationResultStatus result() { /** * Set the result property: The result of validation. - * + * * @param result the result value to set. * @return the ValidationResultItem object itself. */ @@ -102,7 +110,7 @@ public ValidationResultItem withResult(ValidationResultStatus result) { /** * Get the errorMessage property: The error message of validation result. - * + * * @return the errorMessage value. */ public String errorMessage() { @@ -111,7 +119,7 @@ public String errorMessage() { /** * Set the errorMessage property: The error message of validation result. - * + * * @param errorMessage the errorMessage value to set. * @return the ValidationResultItem object itself. */ @@ -122,7 +130,7 @@ public ValidationResultItem withErrorMessage(String errorMessage) { /** * Get the errorCode property: The error code of validation result. - * + * * @return the errorCode value. */ public String errorCode() { @@ -131,7 +139,7 @@ public String errorCode() { /** * Set the errorCode property: The error code of validation result. - * + * * @param errorCode the errorCode value to set. * @return the ValidationResultItem object itself. */ @@ -142,7 +150,7 @@ public ValidationResultItem withErrorCode(String errorCode) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ValidationResultStatus.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ValidationResultStatus.java index 46a6ba0f4b6dd..883bbeda42fed 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ValidationResultStatus.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ValidationResultStatus.java @@ -8,20 +8,37 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ValidationResultStatus. */ +/** + * The result of validation. + */ public final class ValidationResultStatus extends ExpandableStringEnum { - /** Static value success for ValidationResultStatus. */ + /** + * Static value success for ValidationResultStatus. + */ public static final ValidationResultStatus SUCCESS = fromString("success"); - /** Static value failure for ValidationResultStatus. */ + /** + * Static value failure for ValidationResultStatus. + */ public static final ValidationResultStatus FAILURE = fromString("failure"); - /** Static value warning for ValidationResultStatus. */ + /** + * Static value warning for ValidationResultStatus. + */ public static final ValidationResultStatus WARNING = fromString("warning"); + /** + * Creates a new instance of ValidationResultStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ValidationResultStatus() { + } + /** * Creates or finds a ValidationResultStatus from its string representation. - * + * * @param name a name to look for. * @return the corresponding ValidationResultStatus. */ @@ -32,7 +49,7 @@ public static ValidationResultStatus fromString(String name) { /** * Gets known ValidationResultStatus values. - * + * * @return known ValidationResultStatus values. */ public static Collection values() { diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ValueSecretInfo.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ValueSecretInfo.java index 67c09bd77d971..5aae7ba29d7e2 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ValueSecretInfo.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ValueSecretInfo.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** The secret info when type is rawValue. It's for scenarios that user input the secret. */ +/** + * The secret info when type is rawValue. It's for scenarios that user input the secret. + */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "secretType") @JsonTypeName("rawValue") @Fluent @@ -20,9 +22,15 @@ public final class ValueSecretInfo extends SecretInfoBase { @JsonProperty(value = "value") private String value; + /** + * Creates an instance of ValueSecretInfo class. + */ + public ValueSecretInfo() { + } + /** * Get the value property: The actual value of the secret. - * + * * @return the value value. */ public String value() { @@ -31,7 +39,7 @@ public String value() { /** * Set the value property: The actual value of the secret. - * + * * @param value the value value to set. * @return the ValueSecretInfo object itself. */ @@ -42,7 +50,7 @@ public ValueSecretInfo withValue(String value) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/package-info.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/package-info.java index a61928682b80a..dfd7be62dd6bb 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/package-info.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the data models for ServiceLinkerManagementClient. Microsoft.ServiceLinker provider. */ +/** + * Package containing the data models for ServiceLinkerManagementClient. + * Microsoft.ServiceLinker provider test node 20. + */ package com.azure.resourcemanager.servicelinker.models; diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/package-info.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/package-info.java index 2a61c2adb5b7f..7666d211965d3 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/package-info.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/package-info.java @@ -2,5 +2,8 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the classes for ServiceLinkerManagementClient. Microsoft.ServiceLinker provider. */ +/** + * Package containing the classes for ServiceLinkerManagementClient. + * Microsoft.ServiceLinker provider test node 20. + */ package com.azure.resourcemanager.servicelinker; diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/module-info.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/module-info.java index de6b726226e64..a78d6a2899b85 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/module-info.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/module-info.java @@ -10,10 +10,6 @@ exports com.azure.resourcemanager.servicelinker.fluent.models; exports com.azure.resourcemanager.servicelinker.models; - opens com.azure.resourcemanager.servicelinker.fluent.models to - com.azure.core, - com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.servicelinker.models to - com.azure.core, - com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.servicelinker.fluent.models to com.azure.core, com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.servicelinker.models to com.azure.core, com.fasterxml.jackson.databind; } 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 new file mode 100644 index 0000000000000..20184ab96ddc5 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-servicelinker/proxy-config.json @@ -0,0 +1 @@ +[ [ "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" ], [ "com.azure.resourcemanager.servicelinker.implementation.ConfigurationNamesOperationsClientImpl$ConfigurationNamesOperationsService" ] ] \ No newline at end of file diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-servicelinker/reflect-config.json b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-servicelinker/reflect-config.json new file mode 100644 index 0000000000000..76ed384394571 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-servicelinker/reflect-config.json @@ -0,0 +1,341 @@ +[ { + "name" : "com.azure.resourcemanager.servicelinker.models.DryrunList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.fluent.models.DryrunResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.fluent.models.DryrunProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.DryrunParameters", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.DryrunPrerequisiteResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.DryrunOperationPreview", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.DryrunPatch", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.ResourceList", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.fluent.models.LinkerResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.fluent.models.LinkerProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.TargetServiceBase", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.AuthInfoBase", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.VNetSolution", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.SecretStore", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.PublicNetworkSolution", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.FirewallRules", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.ConfigurationInfo", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.DaprProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.DaprMetadata", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.LinkerPatch", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.fluent.models.ValidateOperationResultInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.fluent.models.ValidateResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.ValidationResultItem", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.fluent.models.ConfigurationResultInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.SourceConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.OperationListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.fluent.models.OperationInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.OperationDisplay", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.ConfigurationNameResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.fluent.models.ConfigurationNameItemInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.fluent.models.ConfigurationNames", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.ConfigurationName", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.AzureResourcePropertiesBase", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.AzureKeyVaultProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.ConfluentBootstrapServer", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.SelfHostedServer", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.ConfluentSchemaRegistry", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.SecretInfoBase", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.ValueSecretInfo", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.KeyVaultSecretReferenceSecretInfo", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.KeyVaultSecretUriSecretInfo", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.AccessKeyInfoBase", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.DatabaseAadAuthInfo", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.SecretAuthInfo", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.UserAssignedIdentityAuthInfo", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.SystemAssignedIdentityAuthInfo", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.ServicePrincipalSecretAuthInfo", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.ServicePrincipalCertificateAuthInfo", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.UserAccountAuthInfo", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.CreateOrUpdateDryrunParameters", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.BasicErrorDryrunPrerequisiteResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.PermissionsMissingDryrunPrerequisiteResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.AzureResource", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.DryrunActionName", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.DryrunPrerequisiteResultType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.DryrunPreviewOperationType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.TargetServiceType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.AuthType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.ClientType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.VNetSolutionType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.DeleteOrUpdateBehavior", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.ActionType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.AllowType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.ValidationResultStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.Origin", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.AzureResourceType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.SecretType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.servicelinker.models.AccessKeyPermissions", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +} ] \ 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 new file mode 100644 index 0000000000000..972f4955c8037 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConfigurationNamesOperationListSamples.java @@ -0,0 +1,24 @@ +// 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/2022-11-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 new file mode 100644 index 0000000000000..5645d1879e1d0 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorCreateDryrunSamples.java @@ -0,0 +1,35 @@ +// 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/2022-11-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().defineDryrun("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 new file mode 100644 index 0000000000000..5a0ada6e04d09 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorCreateOrUpdateSamples.java @@ -0,0 +1,33 @@ +// 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.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/2022-11-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().define("connectorName") + .withExistingLocation("00000000-0000-0000-0000-000000000000", "test-rg", "westus") + .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(); + } +} 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 new file mode 100644 index 0000000000000..08949b308e360 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorDeleteDryrunSamples.java @@ -0,0 +1,25 @@ +// 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/2022-11-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 new file mode 100644 index 0000000000000..fbee5f94d9abe --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorDeleteSamples.java @@ -0,0 +1,25 @@ +// 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/2022-11-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 new file mode 100644 index 0000000000000..ceabfb7b3ffb8 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorGenerateConfigurationsSamples.java @@ -0,0 +1,43 @@ +// 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/2022-11-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 new file mode 100644 index 0000000000000..4826f3782b343 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorGetDryrunSamples.java @@ -0,0 +1,25 @@ +// 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/2022-11-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 new file mode 100644 index 0000000000000..f375284abc21a --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorGetSamples.java @@ -0,0 +1,25 @@ +// 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/2022-11-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 new file mode 100644 index 0000000000000..ed4c084e3a6d0 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorListDryrunSamples.java @@ -0,0 +1,25 @@ +// 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/2022-11-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 new file mode 100644 index 0000000000000..bb3fe2e6d4787 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorListSamples.java @@ -0,0 +1,25 @@ +// 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/2022-11-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 new file mode 100644 index 0000000000000..2f3c32feb6afa --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorUpdateDryrunSamples.java @@ -0,0 +1,37 @@ +// 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/2022-11-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 new file mode 100644 index 0000000000000..7c5b9d0443a3d --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorUpdateSamples.java @@ -0,0 +1,34 @@ +// 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.LinkerResource; +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/2022-11-01-preview/examples/ + * PatchConnector.json + */ + /** + * Sample code: PatchConnector. + * + * @param manager Entry point to ServiceLinkerManager. + */ + public static void patchConnector(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { + LinkerResource resource = manager.connectors().getWithResponse("00000000-0000-0000-0000-000000000000", + "test-rg", "westus", "connectorName", com.azure.core.util.Context.NONE).getValue(); + resource.update().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")) + .apply(); + } +} 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 new file mode 100644 index 0000000000000..56347c20fac5c --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/ConnectorValidateSamples.java @@ -0,0 +1,25 @@ +// 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/2022-11-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 c844ea98b6c0a..56d7de9bc9f34 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 @@ -4,92 +4,36 @@ 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.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; -/** Samples for Linker CreateOrUpdate. */ +/** + * Samples for Linker CreateOrUpdate. + */ public final class LinkerCreateOrUpdateSamples { /* - * x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/PutLinkWithSecretStore.json + * x-ms-original-file: + * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2022-11-01-preview/examples/ + * PutLinker.json */ /** - * Sample code: PutLinkWithSecretStore. - * + * Sample code: PutLinker. + * * @param manager Entry point to ServiceLinkerManager. */ - 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( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.KeyVault/vaults/test-kv")) - .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( - "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 ValueSecretInfo().withValue("secret"))) - .create(); + public static void putLinker(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { + manager.linkers().createOrUpdate( + "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", + "linkName", + new LinkerResourceInner().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 ValueSecretInfo().withValue("secret"))) + .withVNetSolution(new VNetSolution().withType(VNetSolutionType.SERVICE_ENDPOINT)), + com.azure.core.util.Context.NONE); } } 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 c45355310f4f3..b96c407d3206e 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 @@ -4,24 +4,23 @@ package com.azure.resourcemanager.servicelinker.generated; -import com.azure.core.util.Context; - -/** Samples for Linker Delete. */ +/** + * Samples for Linker Delete. + */ public final class LinkerDeleteSamples { /* - * x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/DeleteLink.json + * x-ms-original-file: + * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2022-11-01-preview/examples/ + * DeleteLinker.json */ /** - * Sample code: DeleteLink. - * + * Sample code: DeleteLinker. + * * @param manager Entry point to ServiceLinkerManager. */ - 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", - "linkName", - Context.NONE); + public static void deleteLinker(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { + manager.linkers().delete( + "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/LinkerGetSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkerGetSamples.java index 1069239717679..033aba62a012d 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 @@ -4,24 +4,23 @@ package com.azure.resourcemanager.servicelinker.generated; -import com.azure.core.util.Context; - -/** Samples for Linker Get. */ +/** + * Samples for Linker Get. + */ public final class LinkerGetSamples { /* - * x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/Link.json + * x-ms-original-file: + * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2022-11-01-preview/examples/Linker. + * json */ /** - * Sample code: Link. - * + * Sample code: Linker. + * * @param manager Entry point to ServiceLinkerManager. */ - 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", - "linkName", - Context.NONE); + public static void linker(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { + manager.linkers().getWithResponse( + "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/LinkerListConfigurationsSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkerListConfigurationsSamples.java index d32acd2894148..deae3472fbb23 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 @@ -4,24 +4,23 @@ package com.azure.resourcemanager.servicelinker.generated; -import com.azure.core.util.Context; - -/** Samples for Linker ListConfigurations. */ +/** + * Samples for Linker ListConfigurations. + */ public final class LinkerListConfigurationsSamples { /* - * x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/GetConfigurations.json + * x-ms-original-file: + * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2022-11-01-preview/examples/ + * GetConfigurations.json */ /** * Sample code: GetConfiguration. - * + * * @param manager Entry point to ServiceLinkerManager. */ public static void getConfiguration(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager - .linkers() - .listConfigurationsWithResponse( - "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", - "linkName", - Context.NONE); + manager.linkers().listConfigurationsWithResponse( + "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 9d97013795157..b9a7c16316eb0 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 @@ -4,23 +4,23 @@ package com.azure.resourcemanager.servicelinker.generated; -import com.azure.core.util.Context; - -/** Samples for Linker List. */ +/** + * Samples for Linker List. + */ public final class LinkerListSamples { /* - * x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/LinkList.json + * x-ms-original-file: + * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2022-11-01-preview/examples/ + * LinkerList.json */ /** - * Sample code: LinkList. - * + * Sample code: LinkerList. + * * @param manager Entry point to ServiceLinkerManager. */ - 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", - Context.NONE); + public static void linkerList(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { + manager.linkers().list( + "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/LinkerUpdateSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkerUpdateSamples.java index a02c0746e0210..10cc6b5f54fe3 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 @@ -4,38 +4,32 @@ package com.azure.resourcemanager.servicelinker.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.servicelinker.models.AzureResource; -import com.azure.resourcemanager.servicelinker.models.LinkerResource; +import com.azure.resourcemanager.servicelinker.models.LinkerPatch; import com.azure.resourcemanager.servicelinker.models.ServicePrincipalSecretAuthInfo; -/** Samples for Linker Update. */ +/** + * Samples for Linker Update. + */ public final class LinkerUpdateSamples { /* - * x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/PatchLink.json + * x-ms-original-file: + * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2022-11-01-preview/examples/ + * PatchLinker.json */ /** - * Sample code: PatchLink. - * + * Sample code: PatchLinker. + * * @param manager Entry point to ServiceLinkerManager. */ - 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", - "linkName", - Context.NONE) - .getValue(); - resource - .update() - .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("secret")) - .apply(); + public static void patchLinker(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { + manager.linkers().update( + "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app", + "linkName", + 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/LinkerValidateSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkerValidateSamples.java index c4774b19c20a7..1d84f4b2c7ab2 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 @@ -4,24 +4,23 @@ package com.azure.resourcemanager.servicelinker.generated; -import com.azure.core.util.Context; - -/** Samples for Linker Validate. */ +/** + * Samples for Linker Validate. + */ public final class LinkerValidateSamples { /* - * x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/ValidateLinkSuccess.json + * x-ms-original-file: + * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2022-11-01-preview/examples/ + * ValidateLinkerSuccess.json */ /** - * Sample code: ValidateLinkSuccess. - * + * Sample code: ValidateLinkerSuccess. + * * @param manager Entry point to ServiceLinkerManager. */ - 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", - "linkName", - Context.NONE); + public static void validateLinkerSuccess(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { + manager.linkers().validate( + "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/LinkersOperationCreateDryrunSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationCreateDryrunSamples.java new file mode 100644 index 0000000000000..7d80bbdc1ea10 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationCreateDryrunSamples.java @@ -0,0 +1,38 @@ +// 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/2022-11-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 new file mode 100644 index 0000000000000..20ba8e8783aa8 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationDeleteDryrunSamples.java @@ -0,0 +1,26 @@ +// 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/2022-11-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 new file mode 100644 index 0000000000000..d889c2e3e7eed --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationGenerateConfigurationsSamples.java @@ -0,0 +1,44 @@ +// 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/2022-11-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 new file mode 100644 index 0000000000000..6327451063dba --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationGetDryrunSamples.java @@ -0,0 +1,26 @@ +// 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/2022-11-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/LinkersOperationListDryrunSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationListDryrunSamples.java new file mode 100644 index 0000000000000..6482169f8e715 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationListDryrunSamples.java @@ -0,0 +1,26 @@ +// 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/2022-11-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 new file mode 100644 index 0000000000000..5d1e4adff6e74 --- /dev/null +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkersOperationUpdateDryrunSamples.java @@ -0,0 +1,38 @@ +// 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/2022-11-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 814216b514ccf..61c28faf0e1d1 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 @@ -4,19 +4,21 @@ package com.azure.resourcemanager.servicelinker.generated; -import com.azure.core.util.Context; - -/** Samples for Operations List. */ +/** + * Samples for Operations List. + */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/OperationsList.json + * x-ms-original-file: + * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/preview/2022-11-01-preview/examples/ + * OperationsList.json */ /** * Sample code: GetConfiguration. - * + * * @param manager Entry point to ServiceLinkerManager. */ public static void getConfiguration(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) { - manager.operations().list(Context.NONE); + manager.operations().list(com.azure.core.util.Context.NONE); } }