From 7a25040eed47801f654b9dfe80af84189e94bdb5 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 4 Mar 2024 08:42:18 +0000 Subject: [PATCH] CodeGen from PR 3215 in test-repo-billy/azure-rest-api-specs Merge 9f5cfb70eafe423359d2446fff464d523367102d into d8e7a994129b4ac979c55d3033220ac221241be0 --- .../CHANGELOG.md | 4 +- .../README.md | 31 +- .../SAMPLE.md | 231 +++--- .../pom.xml | 11 +- .../servicelinker/ServiceLinkerManager.java | 86 +- .../servicelinker/fluent/LinkersClient.java | 100 +-- .../fluent/OperationsClient.java | 16 +- .../fluent/ServiceLinkerManagementClient.java | 16 +- .../fluent/models/LinkerProperties.java | 38 +- .../fluent/models/LinkerResourceInner.java | 48 +- .../fluent/models/OperationInner.java | 42 +- .../SourceConfigurationResultInner.java | 16 +- .../models/ValidateOperationResultInner.java | 54 +- .../fluent/models/ValidateResult.java | 44 +- .../fluent/models/package-info.java | 5 +- .../servicelinker/fluent/package-info.java | 5 +- .../implementation/LinkerResourceImpl.java | 62 +- .../implementation/LinkersClientImpl.java | 777 +++++++----------- .../implementation/LinkersImpl.java | 142 ++-- .../implementation/OperationImpl.java | 4 +- .../implementation/OperationsClientImpl.java | 171 ++-- .../implementation/OperationsImpl.java | 8 +- .../{Utils.java => ResourceManagerUtils.java} | 45 +- .../ServiceLinkerManagementClientBuilder.java | 46 +- .../ServiceLinkerManagementClientImpl.java | 96 ++- .../SourceConfigurationResultImpl.java | 3 +- .../ValidateOperationResultImpl.java | 3 +- .../implementation/package-info.java | 5 +- .../servicelinker/models/ActionType.java | 21 +- .../servicelinker/models/AuthInfoBase.java | 15 +- .../servicelinker/models/AuthType.java | 37 +- .../models/AzureKeyVaultProperties.java | 16 +- .../servicelinker/models/AzureResource.java | 20 +- .../models/AzureResourcePropertiesBase.java | 14 +- .../models/AzureResourceType.java | 21 +- .../servicelinker/models/ClientType.java | 62 +- .../models/ConfluentBootstrapServer.java | 16 +- .../models/ConfluentSchemaRegistry.java | 16 +- .../KeyVaultSecretReferenceSecretInfo.java | 16 +- .../models/KeyVaultSecretUriSecretInfo.java | 12 +- .../servicelinker/models/LinkerList.java | 20 +- .../servicelinker/models/LinkerPatch.java | 40 +- .../servicelinker/models/LinkerResource.java | 196 +++-- .../servicelinker/models/Linkers.java | 58 +- .../servicelinker/models/Operation.java | 16 +- .../models/OperationDisplay.java | 36 +- .../models/OperationListResult.java | 16 +- .../servicelinker/models/Operations.java | 16 +- .../servicelinker/models/Origin.java | 30 +- .../servicelinker/models/SecretAuthInfo.java | 20 +- .../servicelinker/models/SecretInfoBase.java | 15 +- .../servicelinker/models/SecretStore.java | 16 +- .../servicelinker/models/SecretType.java | 29 +- .../ServicePrincipalCertificateAuthInfo.java | 44 +- .../ServicePrincipalSecretAuthInfo.java | 44 +- .../models/SourceConfiguration.java | 20 +- .../models/SourceConfigurationResult.java | 8 +- .../SystemAssignedIdentityAuthInfo.java | 12 +- .../models/TargetServiceBase.java | 15 +- .../models/TargetServiceType.java | 29 +- .../models/UserAssignedIdentityAuthInfo.java | 20 +- .../servicelinker/models/VNetSolution.java | 16 +- .../models/VNetSolutionType.java | 25 +- .../models/ValidateOperationResult.java | 26 +- .../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 | 10 +- .../proxy-config.json | 1 + .../reflect-config.json | 196 +++++ .../LinkerCreateOrUpdateSamples.java | 83 +- .../generated/LinkerDeleteSamples.java | 20 +- .../generated/LinkerGetSamples.java | 20 +- .../LinkerListConfigurationsSamples.java | 21 +- .../generated/LinkerListSamples.java | 19 +- .../generated/LinkerUpdateSamples.java | 33 +- .../generated/LinkerValidateSamples.java | 21 +- .../generated/OperationsListSamples.java | 14 +- 80 files changed, 1985 insertions(+), 1682 deletions(-) rename sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/{Utils.java => ResourceManagerUtils.java} (79%) 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 diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/CHANGELOG.md b/sdk/servicelinker/azure-resourcemanager-servicelinker/CHANGELOG.md index 3bc971f567b4..02046d09e09d 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-03-04) + +- Azure Resource Manager ServiceLinker client library for Java. This package contains Microsoft Azure SDK for ServiceLinker Management SDK. Microsoft.ServiceLinker provider. Package tag package-2023-05-01. 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 886c1e1a1116..8c92fe91edee 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. Package tag package-2023-05-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-servicelinker - 1.0.0-beta.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 3f1dc36c95da..459dfb1d8e37 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/SAMPLE.md +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/SAMPLE.md @@ -25,82 +25,65 @@ 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/stable/2023-05-01/examples/ + * PutLinkWithSecretStore.json */ /** * Sample code: PutLinkWithSecretStore. - * + * * @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")) + 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(); + .withSecretStore(new SecretStore().withKeyVaultId("fakeTokenPlaceholder")).create(); } /* - * 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/stable/2023-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(); + 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 + * x-ms-original-file: + * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2023-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")) + 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(); @@ -111,25 +94,23 @@ 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/stable/2023-05-01/examples/DeleteLink.json */ /** * Sample code: DeleteLink. - * + * * @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); + 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 +118,23 @@ 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/stable/2023-05-01/examples/Link.json */ /** * Sample code: Link. - * + * * @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); + 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 +142,23 @@ 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/stable/2023-05-01/examples/LinkList.json */ /** * Sample code: LinkList. - * + * * @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); + 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 +166,24 @@ 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/stable/2023-05-01/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,38 +191,31 @@ 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.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/stable/2023-05-01/examples/PatchLink.json */ /** * Sample code: PatchLink. - * + * * @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")) + LinkerResource resource = 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).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(); } } @@ -254,25 +224,24 @@ 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/stable/2023-05-01/examples/ + * ValidateLinkSuccess.json */ /** * Sample code: ValidateLinkSuccess. - * + * * @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); + 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); } } ``` @@ -280,20 +249,22 @@ public final class LinkerValidateSamples { ### Operations_List ```java -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/stable/2023-05-01/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 3ae2b0779db0..e369fc77b83c 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. Package tag package-2023-05-01. 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 d2ca08ad1a68..d0fbaf14113e 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 @@ -36,7 +36,10 @@ import java.util.Objects; import java.util.stream.Collectors; -/** Entry point to ServiceLinkerManager. Microsoft.ServiceLinker provider. */ +/** + * Entry point to ServiceLinkerManager. + * Microsoft.ServiceLinker provider. + */ public final class ServiceLinkerManager { private Linkers linkers; @@ -47,17 +50,14 @@ public final class ServiceLinkerManager { 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 +70,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 +83,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 +164,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 +182,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 +203,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 +227,25 @@ 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. - * + * * @return Resource collection API of Linkers. */ public Linkers linkers() { @@ -277,7 +257,7 @@ public Linkers linkers() { /** * Gets the resource collection API of Operations. - * + * * @return Resource collection API of Operations. */ public Operations operations() { @@ -288,8 +268,10 @@ public Operations operations() { } /** - * @return Wrapped service client ServiceLinkerManagementClient providing direct access to the underlying - * auto-generated API implementation, based on Azure REST API. + * 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/LinkersClient.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/LinkersClient.java index 5c11981acda7..ddc3f19ad9e4 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 @@ -16,11 +16,13 @@ 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. - * + * * @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. @@ -32,7 +34,7 @@ public interface LinkersClient { /** * Returns list of Linkers which connects to the resource. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -45,34 +47,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. - * + * * @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 +84,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. - * + * * @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 +100,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. - * + * * @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. @@ -117,7 +119,7 @@ SyncPoller, LinkerResourceInner> beginCreateOrUp /** * 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 +130,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. - * + * * @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. @@ -146,7 +148,7 @@ LinkerResourceInner createOrUpdate( /** * Delete a link. - * + * * @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. @@ -160,7 +162,7 @@ LinkerResourceInner createOrUpdate( /** * Delete a link. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -172,7 +174,7 @@ LinkerResourceInner createOrUpdate( /** * Delete a link. - * + * * @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. @@ -185,7 +187,7 @@ LinkerResourceInner createOrUpdate( /** * Operation to update an existing link. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. * @param parameters Linker details. @@ -195,12 +197,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. - * + * * @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 +213,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. - * + * * @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. @@ -230,7 +232,7 @@ SyncPoller, LinkerResourceInner> beginUpdate( /** * Operation to update an existing link. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. * @param parameters Linker details. @@ -245,7 +247,7 @@ SyncPoller, LinkerResourceInner> beginUpdate( /** * Validate a link. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -254,12 +256,12 @@ SyncPoller, LinkerResourceInner> beginUpdate( * @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. - * + * * @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. @@ -269,12 +271,12 @@ SyncPoller, ValidateOperationResultInne * @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. - * + * * @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. @@ -287,7 +289,7 @@ SyncPoller, ValidateOperationResultInne /** * Validate a link. - * + * * @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. @@ -301,30 +303,30 @@ SyncPoller, ValidateOperationResultInne /** * 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. - * + * * @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); + SourceConfigurationResultInner listConfigurations(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 3ab76039aba2..89438c26d05a 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 51e97f1c051c..0b8c276b7498 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,46 +7,48 @@ 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 LinkersClient object to access its operations. - * + * * @return the LinkersClient object. */ LinkersClient getLinkers(); /** * Gets the OperationsClient object to access its operations. - * + * * @return the OperationsClient object. */ OperationsClient getOperations(); 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 44ef47e9ee44..56fdd1f29491 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 @@ -12,7 +12,9 @@ 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 { /* @@ -57,9 +59,15 @@ public final class LinkerProperties { @JsonProperty(value = "scope") private String scope; + /** + * 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 +76,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 +87,7 @@ public LinkerProperties withTargetService(TargetServiceBase targetService) { /** * Get the authInfo property: The authentication type. - * + * * @return the authInfo value. */ public AuthInfoBase authInfo() { @@ -88,7 +96,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 +107,7 @@ public LinkerProperties withAuthInfo(AuthInfoBase authInfo) { /** * Get the clientType property: The application client type. - * + * * @return the clientType value. */ public ClientType clientType() { @@ -108,7 +116,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 +127,7 @@ public LinkerProperties withClientType(ClientType clientType) { /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public String provisioningState() { @@ -128,7 +136,7 @@ public String provisioningState() { /** * Get the vNetSolution property: The VNet solution. - * + * * @return the vNetSolution value. */ public VNetSolution vNetSolution() { @@ -137,7 +145,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 +156,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 +165,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 +176,7 @@ public LinkerProperties withSecretStore(SecretStore secretStore) { /** * Get the scope property: connection scope in source service. - * + * * @return the scope value. */ public String scope() { @@ -177,7 +185,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. */ @@ -188,7 +196,7 @@ public LinkerProperties withScope(String scope) { /** * 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/LinkerResourceInner.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/LinkerResourceInner.java index 44f17614df63..d10795f1fa18 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 @@ -15,7 +15,9 @@ 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 { /* @@ -30,9 +32,15 @@ public final class LinkerResourceInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** + * Creates an instance of LinkerResourceInner class. + */ + public LinkerResourceInner() { + } + /** * Get the innerProperties property: The properties of the linker. - * + * * @return the innerProperties value. */ private LinkerProperties innerProperties() { @@ -41,7 +49,7 @@ private LinkerProperties innerProperties() { /** * Get the systemData property: The system data. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -50,7 +58,7 @@ public SystemData systemData() { /** * Get the targetService property: The target service properties. - * + * * @return the targetService value. */ public TargetServiceBase targetService() { @@ -59,7 +67,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 +81,7 @@ public LinkerResourceInner withTargetService(TargetServiceBase targetService) { /** * Get the authInfo property: The authentication type. - * + * * @return the authInfo value. */ public AuthInfoBase authInfo() { @@ -82,7 +90,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 +104,7 @@ public LinkerResourceInner withAuthInfo(AuthInfoBase authInfo) { /** * Get the clientType property: The application client type. - * + * * @return the clientType value. */ public ClientType clientType() { @@ -105,7 +113,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 +127,7 @@ public LinkerResourceInner withClientType(ClientType clientType) { /** * Get the provisioningState property: The provisioning state. - * + * * @return the provisioningState value. */ public String provisioningState() { @@ -128,7 +136,7 @@ public String provisioningState() { /** * Get the vNetSolution property: The VNet solution. - * + * * @return the vNetSolution value. */ public VNetSolution vNetSolution() { @@ -137,7 +145,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 +159,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 +168,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 +182,7 @@ public LinkerResourceInner withSecretStore(SecretStore secretStore) { /** * Get the scope property: connection scope in source service. - * + * * @return the scope value. */ public String scope() { @@ -183,7 +191,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. */ @@ -197,15 +205,13 @@ public LinkerResourceInner withScope(String scope) { /** * 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 3d520cb77233..4282ab927550 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/SourceConfigurationResultInner.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/models/SourceConfigurationResultInner.java index aa517497546a..2f0a87d4493d 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/SourceConfigurationResultInner.java @@ -9,7 +9,9 @@ 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 { /* @@ -18,9 +20,15 @@ public final class SourceConfigurationResultInner { @JsonProperty(value = "configurations") private List configurations; + /** + * Creates an instance of SourceConfigurationResultInner class. + */ + public SourceConfigurationResultInner() { + } + /** * Get the configurations property: The configuration properties for source resource. - * + * * @return the configurations value. */ public List configurations() { @@ -29,7 +37,7 @@ 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. */ @@ -40,7 +48,7 @@ public SourceConfigurationResultInner withConfigurations(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. */ @@ -144,7 +152,7 @@ public ValidateResult withReportEndTimeUtc(OffsetDateTime reportEndTimeUtc) { /** * Get the sourceId property: The resource id of the linker source application. - * + * * @return the sourceId value. */ public String sourceId() { @@ -153,7 +161,7 @@ public String sourceId() { /** * 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 12928aaba782..b70c4fc42301 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. + */ 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 3f6dd75b187a..1bb9daa17dfb 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. + */ package com.azure.resourcemanager.servicelinker.fluent; 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 c8fff03eab9a..72112307a241 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 @@ -87,20 +87,14 @@ public LinkerResourceImpl withExistingResourceUri(String resourceUri) { } public LinkerResource create() { - this.innerObject = - serviceManager - .serviceClient() - .getLinkers() - .createOrUpdate(resourceUri, linkerName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getLinkers().createOrUpdate(resourceUri, linkerName, + 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().getLinkers().createOrUpdate(resourceUri, linkerName, + this.innerModel(), context); return this; } @@ -116,48 +110,36 @@ public LinkerResourceImpl update() { } public LinkerResource apply() { - this.innerObject = - serviceManager.serviceClient().getLinkers().update(resourceUri, linkerName, updateParameters, Context.NONE); + this.innerObject = serviceManager.serviceClient().getLinkers().update(resourceUri, linkerName, updateParameters, + Context.NONE); return this; } public LinkerResource apply(Context context) { - this.innerObject = - serviceManager.serviceClient().getLinkers().update(resourceUri, linkerName, updateParameters, context); + this.innerObject + = serviceManager.serviceClient().getLinkers().update(resourceUri, linkerName, 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.resourceUri = ResourceManagerUtils.getValueFromIdByParameterName(innerObject.id(), + "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}", "resourceUri"); + this.linkerName = ResourceManagerUtils.getValueFromIdByParameterName(innerObject.id(), + "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}", "linkerName"); } public LinkerResource refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getLinkers() - .getWithResponse(resourceUri, linkerName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getLinkers() + .getWithResponse(resourceUri, linkerName, Context.NONE).getValue(); return this; } public LinkerResource refresh(Context context) { - this.innerObject = - serviceManager.serviceClient().getLinkers().getWithResponse(resourceUri, linkerName, context).getValue(); + this.innerObject + = serviceManager.serviceClient().getLinkers().getWithResponse(resourceUri, linkerName, context).getValue(); return this; } @@ -169,14 +151,14 @@ public ValidateOperationResult validate(Context context) { return serviceManager.linkers().validate(resourceUri, linkerName, context); } - public SourceConfigurationResult listConfigurations() { - return serviceManager.linkers().listConfigurations(resourceUri, linkerName); - } - public Response listConfigurationsWithResponse(Context context) { return serviceManager.linkers().listConfigurationsWithResponse(resourceUri, linkerName, context); } + public SourceConfigurationResult listConfigurations() { + return serviceManager.linkers().listConfigurations(resourceUri, linkerName); + } + public LinkerResourceImpl withTargetService(TargetServiceBase targetService) { if (isInCreateMode()) { this.innerModel().withTargetService(targetService); 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 033bdccd2382..1db60d4e487b 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 @@ -43,17 +43,23 @@ 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,82 @@ 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. - * + * * @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 +158,24 @@ 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. - * + * * @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 +186,22 @@ 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. - * + * * @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. @@ -253,7 +215,7 @@ private PagedFlux listAsync(String resourceUri) { /** * Returns list of Linkers which connects to the resource. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -263,13 +225,13 @@ 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. - * + * * @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. @@ -283,7 +245,7 @@ public PagedIterable list(String resourceUri) { /** * Returns list of Linkers which connects to the resource. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -298,22 +260,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 +283,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 +315,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 +336,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. - * + * * @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 +397,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. - * + * * @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 +412,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 +435,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. - * + * * @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 +451,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. - * + * * @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 +474,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. - * + * * @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 +492,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. - * + * * @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 +510,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. - * + * * @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 +527,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. - * + * * @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 +546,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. - * + * * @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. @@ -650,7 +570,7 @@ public LinkerResourceInner createOrUpdate(String resourceUri, String linkerName, /** * 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 +581,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. - * + * * @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 +599,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 +610,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. - * + * * @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 +627,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 +641,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. - * + * * @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 +658,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. - * + * * @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 +674,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. - * + * * @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 +694,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. - * + * * @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 +710,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. - * + * * @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. @@ -825,7 +730,7 @@ private Mono deleteAsync(String resourceUri, String linkerName) { /** * Delete a link. - * + * * @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. @@ -841,7 +746,7 @@ private Mono deleteAsync(String resourceUri, String linkerName, Context co /** * Delete a link. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -855,7 +760,7 @@ public void delete(String resourceUri, String linkerName) { /** * Delete a link. - * + * * @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. @@ -870,24 +775,22 @@ public void delete(String resourceUri, String linkerName, Context context) { /** * Operation to update an existing link. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. * @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 +805,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. - * + * * @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 +820,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 +843,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. - * + * * @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 +859,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. - * + * * @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 +879,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. - * + * * @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 +899,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. - * + * * @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 +917,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. - * + * * @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 +935,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. - * + * * @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 +952,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. - * + * * @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. @@ -1101,7 +976,7 @@ public LinkerResourceInner update(String resourceUri, String linkerName, LinkerP /** * Operation to update an existing link. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. * @param parameters Linker details. @@ -1118,22 +993,20 @@ public LinkerResourceInner update(String resourceUri, String linkerName, LinkerP /** * Validate a link. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the validation operation result for a linker along with {@link Response} on successful completion of - * {@link Mono}. + * {@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,22 +1016,14 @@ 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. - * + * * @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. @@ -1166,16 +1031,14 @@ private Mono>> validateWithResponseAsync(String resour * @throws ManagementException 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}. + * {@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,13 +1048,13 @@ 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. - * + * * @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. @@ -1200,22 +1063,17 @@ private Mono>> validateWithResponseAsync( * @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. - * + * * @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. @@ -1225,23 +1083,18 @@ private PollerFlux, ValidateOperationRe * @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. - * + * * @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. @@ -1250,14 +1103,14 @@ private PollerFlux, ValidateOperationRe * @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. - * + * * @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. @@ -1267,14 +1120,14 @@ public SyncPoller, ValidateOperationRes * @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. - * + * * @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. @@ -1289,7 +1142,7 @@ private Mono validateAsync(String resourceUri, Str /** * Validate a link. - * + * * @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. @@ -1300,14 +1153,13 @@ private Mono validateAsync(String resourceUri, Str */ @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. - * + * * @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. @@ -1322,7 +1174,7 @@ public ValidateOperationResultInner validate(String resourceUri, String linkerNa /** * Validate a link. - * + * * @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. @@ -1338,23 +1190,21 @@ public ValidateOperationResultInner validate(String resourceUri, String linkerNa /** * 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 +1214,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. - * + * * @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 +1229,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,21 +1246,20 @@ 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. - * + * * @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) { @@ -1430,41 +1269,43 @@ private Mono listConfigurationsAsync(String reso /** * 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. - * + * * @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 SourceConfigurationResultInner 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 +1317,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 +1345,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 75322fa6ef05..4f25dfa837cb 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 @@ -25,39 +25,36 @@ 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; } public PagedIterable list(String resourceUri) { PagedIterable inner = this.serviceClient().list(resourceUri); - return Utils.mapPage(inner, inner1 -> new LinkerResourceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new LinkerResourceImpl(inner1, this.manager())); } public PagedIterable list(String resourceUri, Context context) { PagedIterable inner = this.serviceClient().list(resourceUri, context); - return Utils.mapPage(inner, inner1 -> new LinkerResourceImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new LinkerResourceImpl(inner1, this.manager())); } - public LinkerResource get(String resourceUri, String linkerName) { - LinkerResourceInner inner = this.serviceClient().get(resourceUri, linkerName); + public Response getWithResponse(String resourceUri, String linkerName, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceUri, linkerName, context); if (inner != null) { - return new LinkerResourceImpl(inner, this.manager()); + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new LinkerResourceImpl(inner.getValue(), this.manager())); } else { return null; } } - public Response getWithResponse(String resourceUri, String linkerName, Context context) { - Response inner = this.serviceClient().getWithResponse(resourceUri, linkerName, context); + public LinkerResource get(String resourceUri, String linkerName) { + LinkerResourceInner inner = this.serviceClient().get(resourceUri, linkerName); 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; } @@ -89,122 +86,87 @@ 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 SourceConfigurationResultImpl(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 SourceConfigurationResult listConfigurations(String resourceUri, String linkerName) { + SourceConfigurationResultInner 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 SourceConfigurationResultImpl(inner, this.manager()); } else { return null; } } public LinkerResource getById(String id) { - String resourceUri = - Utils - .getValueFromIdByParameterName( - id, "/{resourceUri}/providers/Microsoft.ServiceLinker/linkers/{linkerName}", "resourceUri"); + String resourceUri = ResourceManagerUtils.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))); + 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"); + String linkerName = ResourceManagerUtils.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))); + 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"); + String resourceUri = ResourceManagerUtils.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))); + 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"); + String linkerName = ResourceManagerUtils.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))); + 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"); + String resourceUri = ResourceManagerUtils.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))); + 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"); + String linkerName = ResourceManagerUtils.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))); + 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"); + String resourceUri = ResourceManagerUtils.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))); + 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"); + String linkerName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'linkers'.", id))); } this.delete(resourceUri, linkerName, context); } 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 efdd8fc80cd2..62c554ebcb25 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 fdd4c7907423..79ca516e23a0 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 f0c8895b3988..c7f1900b2a07 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,20 +19,20 @@ 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; } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager())); } private OperationsClient serviceClient() { 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/ResourceManagerUtils.java similarity index 79% rename from sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/Utils.java rename to sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ResourceManagerUtils.java index 665bda23b8d0..ab62db30789e 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/ResourceManagerUtils.java @@ -19,7 +19,10 @@ import java.util.stream.Stream; import reactor.core.publisher.Flux; -final class Utils { +final class ResourceManagerUtils { + private ResourceManagerUtils() { + } + 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/ServiceLinkerManagementClientBuilder.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ServiceLinkerManagementClientBuilder.java index 018b9b5b585e..974122d51a1c 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 49a6b1554356..9ac708c16dfb 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 @@ -34,87 +34,103 @@ 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 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 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() { @@ -123,31 +139,27 @@ public OperationsClient getOperations() { /** * 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 = "2023-05-01"; this.linkers = new LinkersClientImpl(this); this.operations = new OperationsClientImpl(this); } /** * Gets default client context. - * + * * @return the default client context. */ public Context getContext() { @@ -156,7 +168,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 +178,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 +188,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 +209,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/SourceConfigurationResultImpl.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/SourceConfigurationResultImpl.java index b0ea8b17ee5f..b34d9322e7f5 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/SourceConfigurationResultImpl.java @@ -15,8 +15,7 @@ public final class SourceConfigurationResultImpl implements SourceConfigurationR private final com.azure.resourcemanager.servicelinker.ServiceLinkerManager serviceManager; - SourceConfigurationResultImpl( - SourceConfigurationResultInner innerObject, + SourceConfigurationResultImpl(SourceConfigurationResultInner 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/ValidateOperationResultImpl.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/implementation/ValidateOperationResultImpl.java index b6b84aaf6597..ebaff88845c3 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 73895b04fbc5..06c6acae72b7 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. + */ package com.azure.resourcemanager.servicelinker.implementation; 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 765a8393e5c3..391c639b6303 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,27 @@ 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"); + /** + * 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 +39,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/AuthInfoBase.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/AuthInfoBase.java index d3a34302fdde..300a5744f526 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, @@ -21,13 +23,18 @@ @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) }) @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 a14c2a2f7a81..53dda1ea4e84 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,47 @@ 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"); + /** + * 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 +59,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 41fdcf7777ab..98d691a1b6fd 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 511c4257690e..abac406b9795 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 b551b18943dd..244551cec3e1 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 ab23f6c1abd4..ea76e884746b 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/ClientType.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ClientType.java index afad077739f2..ad76a63d1501 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,77 @@ 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"); + + /** + * 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 +89,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/ConfluentBootstrapServer.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ConfluentBootstrapServer.java index 195d2c034554..db3ac6c8d3d4 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 68321e5ebc96..918d32992187 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/KeyVaultSecretReferenceSecretInfo.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/KeyVaultSecretReferenceSecretInfo.java index e3ff01f8b65e..b859430d5a51 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 c0d3e6cd3c9a..7944abd9aaef 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/LinkerList.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/LinkerList.java index d3b63c7c0ba6..1756cada5116 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/LinkerList.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The list of Linker. */ +/** + * The list of Linker. + */ @Fluent public final class LinkerList { /* @@ -24,9 +26,15 @@ public final class LinkerList { @JsonProperty(value = "value") private List value; + /** + * Creates an instance of LinkerList class. + */ + public LinkerList() { + } + /** * Get the nextLink property: The link used to get the next page of Linker list. - * + * * @return the nextLink value. */ public String nextLink() { @@ -35,7 +43,7 @@ public String nextLink() { /** * Set the nextLink property: The link used to get the next page of Linker list. - * + * * @param nextLink the nextLink value to set. * @return the LinkerList object itself. */ @@ -46,7 +54,7 @@ public LinkerList withNextLink(String nextLink) { /** * Get the value property: The list of Linkers. - * + * * @return the value value. */ public List value() { @@ -55,7 +63,7 @@ public List value() { /** * Set the value property: The list of Linkers. - * + * * @param value the value value to set. * @return the LinkerList object itself. */ @@ -66,7 +74,7 @@ public LinkerList withValue(List 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/LinkerPatch.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/LinkerPatch.java index 1328a8126e43..cf297e016783 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. */ @@ -175,7 +183,7 @@ public LinkerPatch withScope(String scope) { /** * 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 c98ee1fd3c03..80d55f943caa 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,300 +9,346 @@ 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. - * + * * @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 inner com.azure.resourcemanager.servicelinker.fluent.models.LinkerResourceInner object. - * + * * @return the inner object. */ LinkerResourceInner innerModel(); - /** The entirety of the LinkerResource definition. */ + /** + * The entirety of the LinkerResource definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithScopeStage, DefinitionStages.WithCreate { } - /** The LinkerResource definition stages. */ + + /** + * The LinkerResource definition stages. + */ interface DefinitionStages { - /** The first stage of the LinkerResource definition. */ + /** + * The first stage of the LinkerResource definition. + */ interface Blank extends WithScopeStage { } - /** The stage of the LinkerResource definition allowing to specify parent resource. */ + + /** + * The stage of the LinkerResource definition allowing to specify parent resource. + */ interface WithScopeStage { /** * Specifies resourceUri. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @return the next definition stage. */ WithCreate withExistingResourceUri(String resourceUri); } + /** * 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 { /** * 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); } } + /** * 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 { /** * 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); } } + /** * 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. */ @@ -310,7 +356,7 @@ interface WithScope { /** * Validate a link. - * + * * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the validation operation result for a linker. @@ -319,7 +365,7 @@ interface WithScope { /** * Validate a link. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -330,22 +376,22 @@ interface WithScope { /** * list source configurations for a linker. - * + * + * @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 listConfigurationsWithResponse(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. + * * @throws com.azure.core.management.exception.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); + SourceConfigurationResult listConfigurations(); } diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/Linkers.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/Linkers.java index 745ca32af706..6f6b4b7e1781 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 @@ -8,11 +8,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Linkers. */ +/** + * Resource collection API of Linkers. + */ public interface Linkers { /** * Returns list of Linkers which connects to the resource. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -23,7 +25,7 @@ public interface Linkers { /** * Returns list of Linkers which connects to the resource. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -35,32 +37,32 @@ 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. - * + * * @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. @@ -71,7 +73,7 @@ public interface Linkers { /** * Delete a link. - * + * * @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. @@ -83,7 +85,7 @@ public interface Linkers { /** * Validate a link. - * + * * @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected. * @param linkerName The name Linker resource. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -95,7 +97,7 @@ public interface Linkers { /** * Validate a link. - * + * * @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. @@ -108,34 +110,34 @@ public interface Linkers { /** * 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}. */ - SourceConfigurationResult listConfigurations(String resourceUri, String linkerName); + Response listConfigurationsWithResponse(String resourceUri, String linkerName, + Context context); /** * 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. */ - Response listConfigurationsWithResponse( - String resourceUri, String linkerName, Context context); + SourceConfigurationResult listConfigurations(String resourceUri, String linkerName); /** * Returns Linker 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. @@ -146,7 +148,7 @@ Response listConfigurationsWithResponse( /** * Returns Linker 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. @@ -158,7 +160,7 @@ Response listConfigurationsWithResponse( /** * Delete a link. - * + * * @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. @@ -168,7 +170,7 @@ Response listConfigurationsWithResponse( /** * Delete a link. - * + * * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -179,7 +181,7 @@ Response listConfigurationsWithResponse( /** * Begins definition for a new LinkerResource resource. - * + * * @param name resource name. * @return the first stage of the new LinkerResource definition. */ 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 e68e7d7d00dd..2cc62581a38e 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 7def6a8572ed..3ebeb4b06f20 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 e67087ab4762..8395d06ee7a7 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 2ed86c9c352d..957030b39b73 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 4b62b0bbe7c9..fcea182be72b 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/SecretAuthInfo.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SecretAuthInfo.java index a3c86beaa531..eee877480900 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 1be6c07d0781..9452239a60da 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 626bbf876330..72e7cd6adb4e 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,15 @@ public final class SecretStore { @JsonProperty(value = "keyVaultId") private String keyVaultId; + /** + * 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 +35,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. */ @@ -38,7 +46,7 @@ public SecretStore withKeyVaultId(String keyVaultId) { /** * 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 4d9a05cf41f7..dbb7ba0cc163 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/ServicePrincipalCertificateAuthInfo.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ServicePrincipalCertificateAuthInfo.java index dc9e1d46c572..ab1a859d624b 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ServicePrincipalCertificateAuthInfo.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ServicePrincipalCertificateAuthInfo.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** 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 +32,18 @@ public final class ServicePrincipalCertificateAuthInfo extends AuthInfoBase { /* * ServicePrincipal certificate for servicePrincipal auth. */ - @JsonProperty(value = "certificate", required = true) + @JsonProperty(value = "certificate") private String certificate; + /** + * 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 +52,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 +63,7 @@ public ServicePrincipalCertificateAuthInfo withClientId(String clientId) { /** * Get the principalId property: Principal Id for servicePrincipal auth. - * + * * @return the principalId value. */ public String principalId() { @@ -64,7 +72,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 +83,7 @@ public ServicePrincipalCertificateAuthInfo withPrincipalId(String principalId) { /** * Get the certificate property: ServicePrincipal certificate for servicePrincipal auth. - * + * * @return the certificate value. */ public String certificate() { @@ -84,7 +92,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. */ @@ -95,29 +103,23 @@ public ServicePrincipalCertificateAuthInfo withCertificate(String certificate) { /** * 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 97ccd04b48fc..17bf0166393c 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ServicePrincipalSecretAuthInfo.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/ServicePrincipalSecretAuthInfo.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** 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 +32,18 @@ public final class ServicePrincipalSecretAuthInfo extends AuthInfoBase { /* * Secret for servicePrincipal auth. */ - @JsonProperty(value = "secret", required = true) + @JsonProperty(value = "secret") private String secret; + /** + * 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 +52,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 +63,7 @@ public ServicePrincipalSecretAuthInfo withClientId(String clientId) { /** * Get the principalId property: Principal Id for servicePrincipal auth. - * + * * @return the principalId value. */ public String principalId() { @@ -64,7 +72,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 +83,7 @@ public ServicePrincipalSecretAuthInfo withPrincipalId(String principalId) { /** * Get the secret property: Secret for servicePrincipal auth. - * + * * @return the secret value. */ public String secret() { @@ -84,7 +92,7 @@ public String secret() { /** * Set the secret property: Secret for servicePrincipal auth. - * + * * @param secret the secret value to set. * @return the ServicePrincipalSecretAuthInfo object itself. */ @@ -95,29 +103,23 @@ public ServicePrincipalSecretAuthInfo withSecret(String secret) { /** * 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 3311bebb78d6..e3baa74915ff 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/SourceConfigurationResult.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SourceConfigurationResult.java index 808f14d90d87..959688742701 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/SourceConfigurationResult.java @@ -7,18 +7,20 @@ import com.azure.resourcemanager.servicelinker.fluent.models.SourceConfigurationResultInner; import java.util.List; -/** An immutable client-side representation of SourceConfigurationResult. */ +/** + * An immutable client-side representation of SourceConfigurationResult. + */ public interface SourceConfigurationResult { /** * 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. - * + * * @return the inner object. */ SourceConfigurationResultInner innerModel(); diff --git a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SystemAssignedIdentityAuthInfo.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/SystemAssignedIdentityAuthInfo.java index 2548428a6cd9..46164cb190d2 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 @@ -8,14 +8,22 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** 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 public final class SystemAssignedIdentityAuthInfo extends AuthInfoBase { + /** + * Creates an instance of SystemAssignedIdentityAuthInfo class. + */ + public SystemAssignedIdentityAuthInfo() { + } + /** * 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 1238b95ce799..d598a0694011 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,18 @@ @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 = "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 4d11eaf03f4b..ece736ac87dd 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,37 @@ 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"); + /** + * 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 +49,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/UserAssignedIdentityAuthInfo.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/UserAssignedIdentityAuthInfo.java index d5df511c9e11..d791dcbdd088 100644 --- a/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/UserAssignedIdentityAuthInfo.java +++ b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/models/UserAssignedIdentityAuthInfo.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; -/** 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 +28,15 @@ public final class UserAssignedIdentityAuthInfo extends AuthInfoBase { @JsonProperty(value = "subscriptionId") private String subscriptionId; + /** + * 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 +45,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 +56,7 @@ public UserAssignedIdentityAuthInfo withClientId(String clientId) { /** * Get the subscriptionId property: Subscription id for userAssignedIdentity. - * + * * @return the subscriptionId value. */ public String subscriptionId() { @@ -57,7 +65,7 @@ public String subscriptionId() { /** * Set the subscriptionId property: Subscription id for userAssignedIdentity. - * + * * @param subscriptionId the subscriptionId value to set. * @return the UserAssignedIdentityAuthInfo object itself. */ @@ -68,7 +76,7 @@ public UserAssignedIdentityAuthInfo withSubscriptionId(String subscriptionId) { /** * 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 dcda96357634..f7f5b10ea586 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,15 @@ public final class VNetSolution { @JsonProperty(value = "type") private VNetSolutionType type; + /** + * 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 +35,7 @@ public VNetSolutionType type() { /** * Set the type property: Type of VNet solution. - * + * * @param type the type value to set. * @return the VNetSolution object itself. */ @@ -38,7 +46,7 @@ public VNetSolution withType(VNetSolutionType type) { /** * 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 ed188a96f8a9..826dd7c6b84f 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 0f94afd52643..1e38814da8f5 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. - * + * * @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. - * + * * @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 5596845415ce..407996dea610 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 46a6ba0f4b6d..883bbeda42fe 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 67c09bd77d97..5aae7ba29d7e 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 a61928682b80..e0aa1793072a 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. + */ 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 2a61c2adb5b7..f6f1aa9b4056 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. + */ 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 de6b726226e6..2cb06bdfa4c8 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 @@ -4,16 +4,10 @@ module com.azure.resourcemanager.servicelinker { requires transitive com.azure.core.management; - exports com.azure.resourcemanager.servicelinker; exports com.azure.resourcemanager.servicelinker.fluent; 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 000000000000..e5c8a05bd32b --- /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.LinkersClientImpl$LinkersService" ], [ "com.azure.resourcemanager.servicelinker.implementation.OperationsClientImpl$OperationsService" ] ] \ 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 000000000000..272064449062 --- /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,196 @@ +[ { + "name" : "com.azure.resourcemanager.servicelinker.models.LinkerList", + "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.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.SourceConfigurationResultInner", + "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.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.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.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.AzureResource", + "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.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.ActionType", + "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 +} ] \ No newline at end of file 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 c844ea98b6c0..2d286bd28868 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 @@ -12,82 +12,65 @@ 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/stable/2023-05-01/examples/ + * PutLinkWithSecretStore.json */ /** * Sample code: PutLinkWithSecretStore. - * + * * @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")) + 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(); + .withSecretStore(new SecretStore().withKeyVaultId("fakeTokenPlaceholder")).create(); } /* - * 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/stable/2023-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(); + 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 + * x-ms-original-file: + * specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2023-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")) + 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(); 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 c45355310f4f..6ac1b93c219e 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,22 @@ 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/stable/2023-05-01/examples/DeleteLink.json */ /** * Sample code: DeleteLink. - * + * * @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); + 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 106923971767..040085713a55 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,22 @@ 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/stable/2023-05-01/examples/Link.json */ /** * Sample code: Link. - * + * * @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); + 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 d32acd289414..c76f1d4951e2 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/stable/2023-05-01/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 9d9701379515..116377bf70b9 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,22 @@ 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/stable/2023-05-01/examples/LinkList.json */ /** * Sample code: LinkList. - * + * * @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); + 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 a02c0746e021..604ccacba38a 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,31 @@ 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.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/stable/2023-05-01/examples/PatchLink.json */ /** * Sample code: PatchLink. - * + * * @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")) + LinkerResource resource = 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).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/LinkerValidateSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/LinkerValidateSamples.java index c4774b19c20a..3286e0a0529d 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/stable/2023-05-01/examples/ + * ValidateLinkSuccess.json */ /** * Sample code: ValidateLinkSuccess. - * + * * @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); + 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/OperationsListSamples.java b/sdk/servicelinker/azure-resourcemanager-servicelinker/src/samples/java/com/azure/resourcemanager/servicelinker/generated/OperationsListSamples.java index 814216b514cc..f96b3e7047f1 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/stable/2023-05-01/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); } }