diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/CHANGELOG.md b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/CHANGELOG.md index 2b46365eb3b83..40163c22595a8 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/CHANGELOG.md +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.4 (Unreleased) +## 1.0.0-beta.1 (2023-02-13) + +- Azure Resource Manager SourceControlConfiguration client library for Java. This package contains Microsoft Azure SDK for SourceControlConfiguration Management SDK. KubernetesConfiguration Client. Package tag package-2022-11. 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/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/README.md b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/README.md index 1b3c2e1cec2e3..968a236865f01 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/README.md +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/README.md @@ -2,7 +2,7 @@ Azure Resource Manager SourceControlConfiguration client library for Java. -This package contains Microsoft Azure SDK for SourceControlConfiguration Management SDK. KubernetesConfiguration Client. Package tag package-2022-03. 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 SourceControlConfiguration Management SDK. KubernetesConfiguration Client. Package tag package-2022-11. 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-kubernetesconfiguration - 1.0.0-beta.3 + 1.0.0-beta.4 ``` [//]: # ({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, Azure Active Directory 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,13 +83,13 @@ 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 @@ -100,3 +100,6 @@ For details on contributing to this repository, see the [contributing guide](htt [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/ diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/SAMPLE.md b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/SAMPLE.md index e1c0104532f64..bed1f7ef20e29 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/SAMPLE.md +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/SAMPLE.md @@ -39,8 +39,8 @@ ### Extensions_Create ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.ExtensionInner; +import com.azure.resourcemanager.kubernetesconfiguration.models.Plan; import com.azure.resourcemanager.kubernetesconfiguration.models.Scope; import com.azure.resourcemanager.kubernetesconfiguration.models.ScopeCluster; import java.util.HashMap; @@ -49,7 +49,7 @@ import java.util.Map; /** Samples for Extensions Create. */ public final class ExtensionsCreateSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/CreateExtension.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/CreateExtension.json */ /** * Sample code: Create Extension. @@ -78,7 +78,37 @@ public final class ExtensionsCreateSamples { "omsagent.secret.wsid", "a38cef99-5a89-52ed-b6db-22095c23664b")) .withConfigurationProtectedSettings(mapOf("omsagent.secret.key", "secretKeyValue01")), - Context.NONE); + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/CreateExtensionWithPlan.json + */ + /** + * Sample code: Create Extension with Plan. + * + * @param manager Entry point to SourceControlConfigurationManager. + */ + public static void createExtensionWithPlan( + com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager manager) { + manager + .extensions() + .create( + "rg1", + "Microsoft.Kubernetes", + "connectedClusters", + "clusterName1", + "azureVote", + new ExtensionInner() + .withPlan( + new Plan() + .withName("azure-vote-standard") + .withPublisher("Microsoft") + .withProduct("azure-vote-standard-offer-id")) + .withExtensionType("azure-vote") + .withAutoUpgradeMinorVersion(true) + .withReleaseTrain("Preview"), + com.azure.core.util.Context.NONE); } @SuppressWarnings("unchecked") @@ -97,12 +127,10 @@ public final class ExtensionsCreateSamples { ### Extensions_Delete ```java -import com.azure.core.util.Context; - /** Samples for Extensions Delete. */ public final class ExtensionsDeleteSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/DeleteExtension.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/DeleteExtension.json */ /** * Sample code: Delete Extension. @@ -120,7 +148,7 @@ public final class ExtensionsDeleteSamples { "clusterName1", "ClusterMonitor", null, - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -128,12 +156,31 @@ public final class ExtensionsDeleteSamples { ### Extensions_Get ```java -import com.azure.core.util.Context; - /** Samples for Extensions Get. */ public final class ExtensionsGetSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/GetExtension.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/GetExtensionWithPlan.json + */ + /** + * Sample code: Get Extension with Plan. + * + * @param manager Entry point to SourceControlConfigurationManager. + */ + public static void getExtensionWithPlan( + com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager manager) { + manager + .extensions() + .getWithResponse( + "rg1", + "Microsoft.Kubernetes", + "connectedClusters", + "clusterName1", + "azureVote", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/GetExtension.json */ /** * Sample code: Get Extension. @@ -145,7 +192,12 @@ public final class ExtensionsGetSamples { manager .extensions() .getWithResponse( - "rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", "ClusterMonitor", Context.NONE); + "rg1", + "Microsoft.Kubernetes", + "connectedClusters", + "clusterName1", + "ClusterMonitor", + com.azure.core.util.Context.NONE); } } ``` @@ -153,12 +205,10 @@ public final class ExtensionsGetSamples { ### Extensions_List ```java -import com.azure.core.util.Context; - /** Samples for Extensions List. */ public final class ExtensionsListSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/ListExtensions.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/ListExtensions.json */ /** * Sample code: List Extensions. @@ -167,7 +217,9 @@ public final class ExtensionsListSamples { */ public static void listExtensions( com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager manager) { - manager.extensions().list("rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", Context.NONE); + manager + .extensions() + .list("rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", com.azure.core.util.Context.NONE); } } ``` @@ -175,7 +227,6 @@ public final class ExtensionsListSamples { ### Extensions_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.kubernetesconfiguration.models.PatchExtension; import java.util.HashMap; import java.util.Map; @@ -183,7 +234,7 @@ import java.util.Map; /** Samples for Extensions Update. */ public final class ExtensionsUpdateSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/PatchExtension.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/PatchExtension.json */ /** * Sample code: Update Extension. @@ -210,7 +261,7 @@ public final class ExtensionsUpdateSamples { "omsagent.secret.wsid", "a38cef99-5a89-52ed-b6db-22095c23664b")) .withConfigurationProtectedSettings(mapOf("omsagent.secret.key", "secretKeyValue01")), - Context.NONE); + com.azure.core.util.Context.NONE); } @SuppressWarnings("unchecked") @@ -229,12 +280,10 @@ public final class ExtensionsUpdateSamples { ### FluxConfigOperationStatus_Get ```java -import com.azure.core.util.Context; - /** Samples for FluxConfigOperationStatus Get. */ public final class FluxConfigOperationStatusGetSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/GetFluxConfigurationAsyncOperationStatus.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/GetFluxConfigurationAsyncOperationStatus.json */ /** * Sample code: FluxConfigurationAsyncOperationStatus Get. @@ -252,7 +301,7 @@ public final class FluxConfigOperationStatusGetSamples { "clusterName1", "srs-fluxconfig", "99999999-9999-9999-9999-999999999999", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -260,7 +309,6 @@ public final class FluxConfigOperationStatusGetSamples { ### FluxConfigurations_CreateOrUpdate ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.FluxConfigurationInner; import com.azure.resourcemanager.kubernetesconfiguration.models.BucketDefinition; import com.azure.resourcemanager.kubernetesconfiguration.models.GitRepositoryDefinition; @@ -275,7 +323,7 @@ import java.util.Map; /** Samples for FluxConfigurations CreateOrUpdate. */ public final class FluxConfigurationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/CreateFluxConfiguration.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/CreateFluxConfiguration.json */ /** * Sample code: Create Flux Configuration. @@ -320,11 +368,11 @@ public final class FluxConfigurationsCreateOrUpdateSamples { .withSyncIntervalInSeconds(600L) .withRetryIntervalInSeconds(600L) .withPrune(false))), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/CreateFluxConfigurationWithBucket.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/CreateFluxConfigurationWithBucket.json */ /** * Sample code: Create Flux Configuration with Bucket Source Kind. @@ -352,7 +400,7 @@ public final class FluxConfigurationsCreateOrUpdateSamples { .withBucketName("flux") .withTimeoutInSeconds(1000L) .withSyncIntervalInSeconds(1000L) - .withAccessKey("fluxminiotest")) + .withAccessKey("fakeTokenPlaceholder")) .withKustomizations( mapOf( "srs-kustomization1", @@ -369,7 +417,7 @@ public final class FluxConfigurationsCreateOrUpdateSamples { .withSyncIntervalInSeconds(600L) .withRetryIntervalInSeconds(600L) .withPrune(false))), - Context.NONE); + com.azure.core.util.Context.NONE); } @SuppressWarnings("unchecked") @@ -388,12 +436,10 @@ public final class FluxConfigurationsCreateOrUpdateSamples { ### FluxConfigurations_Delete ```java -import com.azure.core.util.Context; - /** Samples for FluxConfigurations Delete. */ public final class FluxConfigurationsDeleteSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/DeleteFluxConfiguration.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/DeleteFluxConfiguration.json */ /** * Sample code: Delete Flux Configuration. @@ -411,7 +457,7 @@ public final class FluxConfigurationsDeleteSamples { "clusterName1", "srs-fluxconfig", null, - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -419,12 +465,10 @@ public final class FluxConfigurationsDeleteSamples { ### FluxConfigurations_Get ```java -import com.azure.core.util.Context; - /** Samples for FluxConfigurations Get. */ public final class FluxConfigurationsGetSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/GetFluxConfiguration.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/GetFluxConfiguration.json */ /** * Sample code: Get Flux Configuration. @@ -436,7 +480,12 @@ public final class FluxConfigurationsGetSamples { manager .fluxConfigurations() .getWithResponse( - "rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", "srs-fluxconfig", Context.NONE); + "rg1", + "Microsoft.Kubernetes", + "connectedClusters", + "clusterName1", + "srs-fluxconfig", + com.azure.core.util.Context.NONE); } } ``` @@ -444,12 +493,10 @@ public final class FluxConfigurationsGetSamples { ### FluxConfigurations_List ```java -import com.azure.core.util.Context; - /** Samples for FluxConfigurations List. */ public final class FluxConfigurationsListSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/ListFluxConfigurations.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/ListFluxConfigurations.json */ /** * Sample code: List Flux Configuration. @@ -460,7 +507,7 @@ public final class FluxConfigurationsListSamples { com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager manager) { manager .fluxConfigurations() - .list("rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", Context.NONE); + .list("rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", com.azure.core.util.Context.NONE); } } ``` @@ -468,7 +515,6 @@ public final class FluxConfigurationsListSamples { ### FluxConfigurations_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.kubernetesconfiguration.models.FluxConfigurationPatch; import com.azure.resourcemanager.kubernetesconfiguration.models.GitRepositoryPatchDefinition; import com.azure.resourcemanager.kubernetesconfiguration.models.KustomizationPatchDefinition; @@ -478,7 +524,7 @@ import java.util.Map; /** Samples for FluxConfigurations Update. */ public final class FluxConfigurationsUpdateSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/PatchFluxConfiguration.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/PatchFluxConfiguration.json */ /** * Sample code: Patch Flux Configuration. @@ -512,7 +558,7 @@ public final class FluxConfigurationsUpdateSamples { new KustomizationPatchDefinition() .withPath("./test/another-path") .withSyncIntervalInSeconds(300L))), - Context.NONE); + com.azure.core.util.Context.NONE); } @SuppressWarnings("unchecked") @@ -531,12 +577,10 @@ public final class FluxConfigurationsUpdateSamples { ### OperationStatus_Get ```java -import com.azure.core.util.Context; - /** Samples for OperationStatus Get. */ public final class OperationStatusGetSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/GetExtensionAsyncOperationStatus.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/GetExtensionAsyncOperationStatus.json */ /** * Sample code: ExtensionAsyncOperationStatus Get. @@ -554,7 +598,7 @@ public final class OperationStatusGetSamples { "clusterName1", "ClusterMonitor", "99999999-9999-9999-9999-999999999999", - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -562,12 +606,10 @@ public final class OperationStatusGetSamples { ### OperationStatus_List ```java -import com.azure.core.util.Context; - /** Samples for OperationStatus List. */ public final class OperationStatusListSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/ListAsyncOperationStatus.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/ListAsyncOperationStatus.json */ /** * Sample code: AsyncOperationStatus List. @@ -578,7 +620,7 @@ public final class OperationStatusListSamples { com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager manager) { manager .operationStatus() - .list("rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", Context.NONE); + .list("rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", com.azure.core.util.Context.NONE); } } ``` @@ -586,12 +628,10 @@ public final class OperationStatusListSamples { ### Operations_List ```java -import com.azure.core.util.Context; - /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/OperationsList.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/OperationsList.json */ /** * Sample code: BatchAccountDelete. @@ -600,7 +640,7 @@ public final class OperationsListSamples { */ public static void batchAccountDelete( com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager manager) { - manager.operations().list(Context.NONE); + manager.operations().list(com.azure.core.util.Context.NONE); } } ``` @@ -608,7 +648,6 @@ public final class OperationsListSamples { ### SourceControlConfigurations_CreateOrUpdate ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.SourceControlConfigurationInner; import com.azure.resourcemanager.kubernetesconfiguration.models.HelmOperatorProperties; import com.azure.resourcemanager.kubernetesconfiguration.models.OperatorScopeType; @@ -619,7 +658,7 @@ import java.util.Map; /** Samples for SourceControlConfigurations CreateOrUpdate. */ public final class SourceControlConfigurationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/CreateSourceControlConfiguration.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/CreateSourceControlConfiguration.json */ /** * Sample code: Create Source Control Configuration. @@ -652,7 +691,7 @@ public final class SourceControlConfigurationsCreateOrUpdateSamples { .withChartVersion("0.3.0") .withChartValues( "--set git.ssh.secretName=flux-git-deploy --set tillerNamespace=kube-system")), - Context.NONE); + com.azure.core.util.Context.NONE); } @SuppressWarnings("unchecked") @@ -671,12 +710,10 @@ public final class SourceControlConfigurationsCreateOrUpdateSamples { ### SourceControlConfigurations_Delete ```java -import com.azure.core.util.Context; - /** Samples for SourceControlConfigurations Delete. */ public final class SourceControlConfigurationsDeleteSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/DeleteSourceControlConfiguration.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/DeleteSourceControlConfiguration.json */ /** * Sample code: Delete Source Control Configuration. @@ -688,7 +725,12 @@ public final class SourceControlConfigurationsDeleteSamples { manager .sourceControlConfigurations() .delete( - "rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", "SRS_GitHubConfig", Context.NONE); + "rg1", + "Microsoft.Kubernetes", + "connectedClusters", + "clusterName1", + "SRS_GitHubConfig", + com.azure.core.util.Context.NONE); } } ``` @@ -696,12 +738,10 @@ public final class SourceControlConfigurationsDeleteSamples { ### SourceControlConfigurations_Get ```java -import com.azure.core.util.Context; - /** Samples for SourceControlConfigurations Get. */ public final class SourceControlConfigurationsGetSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/GetSourceControlConfiguration.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/GetSourceControlConfiguration.json */ /** * Sample code: Get Source Control Configuration. @@ -713,7 +753,12 @@ public final class SourceControlConfigurationsGetSamples { manager .sourceControlConfigurations() .getWithResponse( - "rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", "SRS_GitHubConfig", Context.NONE); + "rg1", + "Microsoft.Kubernetes", + "connectedClusters", + "clusterName1", + "SRS_GitHubConfig", + com.azure.core.util.Context.NONE); } } ``` @@ -721,12 +766,10 @@ public final class SourceControlConfigurationsGetSamples { ### SourceControlConfigurations_List ```java -import com.azure.core.util.Context; - /** Samples for SourceControlConfigurations List. */ public final class SourceControlConfigurationsListSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/ListSourceControlConfiguration.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/ListSourceControlConfiguration.json */ /** * Sample code: List Source Control Configuration. @@ -737,7 +780,7 @@ public final class SourceControlConfigurationsListSamples { com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager manager) { manager .sourceControlConfigurations() - .list("rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", Context.NONE); + .list("rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", com.azure.core.util.Context.NONE); } } ``` diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/pom.xml b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/pom.xml index ac56c852dc518..e244048798c16 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/pom.xml +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/pom.xml @@ -13,7 +13,7 @@ jar Microsoft Azure SDK for SourceControlConfiguration Management - This package contains Microsoft Azure SDK for SourceControlConfiguration Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. KubernetesConfiguration Client. Package tag package-2022-03. + This package contains Microsoft Azure SDK for SourceControlConfiguration Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. KubernetesConfiguration Client. Package tag package-2022-11. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/SourceControlConfigurationManager.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/SourceControlConfigurationManager.java index 94e2546db1985..c6793051e08b2 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/SourceControlConfigurationManager.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/SourceControlConfigurationManager.java @@ -10,11 +10,13 @@ import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; @@ -84,6 +86,19 @@ public static SourceControlConfigurationManager authenticate(TokenCredential cre return configure().authenticate(credential, profile); } + /** + * Creates an instance of SourceControlConfiguration service API entry point. + * + * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. + * @param profile the Azure profile for client. + * @return the SourceControlConfiguration service API instance. + */ + public static SourceControlConfigurationManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return new SourceControlConfigurationManager(httpPipeline, profile, null); + } + /** * Gets a Configurable instance that can be used to create SourceControlConfigurationManager with optional * configuration. @@ -103,6 +118,7 @@ public static final class Configurable { private final List policies = new ArrayList<>(); private final List scopes = new ArrayList<>(); private RetryPolicy retryPolicy; + private RetryOptions retryOptions; private Duration defaultPollInterval; private Configurable() { @@ -163,6 +179,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { return this; } + /** + * Sets the retry options for the HTTP pipeline retry policy. + * + *

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. + */ + public Configurable withRetryOptions(RetryOptions retryOptions) { + this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); + return this; + } + /** * Sets the default poll interval, used when service does not provide "Retry-After" header. * @@ -196,7 +225,7 @@ public SourceControlConfigurationManager authenticate(TokenCredential credential .append("-") .append("com.azure.resourcemanager.kubernetesconfiguration") .append("/") - .append("1.0.0-beta.3"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -214,10 +243,15 @@ public SourceControlConfigurationManager authenticate(TokenCredential credential scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); } if (retryPolicy == null) { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + if (retryOptions != null) { + retryPolicy = new RetryPolicy(retryOptions); + } else { + retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + } } List policies = new ArrayList<>(); policies.add(new UserAgentPolicy(userAgentBuilder.toString())); + policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); policies .addAll( @@ -248,7 +282,11 @@ public SourceControlConfigurationManager authenticate(TokenCredential credential } } - /** @return Resource collection API of Extensions. */ + /** + * Gets the resource collection API of Extensions. + * + * @return Resource collection API of Extensions. + */ public Extensions extensions() { if (this.extensions == null) { this.extensions = new ExtensionsImpl(clientObject.getExtensions(), this); @@ -256,7 +294,11 @@ public Extensions extensions() { return extensions; } - /** @return Resource collection API of OperationStatus. */ + /** + * Gets the resource collection API of OperationStatus. + * + * @return Resource collection API of OperationStatus. + */ public OperationStatus operationStatus() { if (this.operationStatus == null) { this.operationStatus = new OperationStatusImpl(clientObject.getOperationStatus(), this); @@ -264,7 +306,11 @@ public OperationStatus operationStatus() { return operationStatus; } - /** @return Resource collection API of FluxConfigurations. */ + /** + * Gets the resource collection API of FluxConfigurations. + * + * @return Resource collection API of FluxConfigurations. + */ public FluxConfigurations fluxConfigurations() { if (this.fluxConfigurations == null) { this.fluxConfigurations = new FluxConfigurationsImpl(clientObject.getFluxConfigurations(), this); @@ -272,7 +318,11 @@ public FluxConfigurations fluxConfigurations() { return fluxConfigurations; } - /** @return Resource collection API of FluxConfigOperationStatus. */ + /** + * Gets the resource collection API of FluxConfigOperationStatus. + * + * @return Resource collection API of FluxConfigOperationStatus. + */ public FluxConfigOperationStatus fluxConfigOperationStatus() { if (this.fluxConfigOperationStatus == null) { this.fluxConfigOperationStatus = @@ -281,7 +331,11 @@ public FluxConfigOperationStatus fluxConfigOperationStatus() { return fluxConfigOperationStatus; } - /** @return Resource collection API of SourceControlConfigurations. */ + /** + * Gets the resource collection API of SourceControlConfigurations. + * + * @return Resource collection API of SourceControlConfigurations. + */ public SourceControlConfigurations sourceControlConfigurations() { if (this.sourceControlConfigurations == null) { this.sourceControlConfigurations = @@ -290,7 +344,11 @@ public SourceControlConfigurations sourceControlConfigurations() { return sourceControlConfigurations; } - /** @return Resource collection API of Operations. */ + /** + * Gets the resource collection API of Operations. + * + * @return Resource collection API of Operations. + */ public Operations operations() { if (this.operations == null) { this.operations = new OperationsImpl(clientObject.getOperations(), this); diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/ExtensionsClient.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/ExtensionsClient.java index 0643ae0f6084f..4cfb741f6e143 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/ExtensionsClient.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/ExtensionsClient.java @@ -130,18 +130,20 @@ ExtensionInner create( * provisionedClusters. * @param clusterName The name of the kubernetes cluster. * @param extensionName Name of the Extension. + * @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 kubernetes Cluster Extension. + * @return kubernetes Cluster Extension along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ExtensionInner get( + Response getWithResponse( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, - String extensionName); + String extensionName, + Context context); /** * Gets Kubernetes Cluster Extension. @@ -153,20 +155,18 @@ ExtensionInner get( * provisionedClusters. * @param clusterName The name of the kubernetes cluster. * @param extensionName Name of the Extension. - * @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 kubernetes Cluster Extension along with {@link Response}. + * @return kubernetes Cluster Extension. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( + ExtensionInner get( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, - String extensionName, - Context context); + String extensionName); /** * Delete a Kubernetes Cluster Extension. This will cause the Agent to Uninstall the extension from the cluster. @@ -178,7 +178,6 @@ Response getWithResponse( * provisionedClusters. * @param clusterName The name of the kubernetes cluster. * @param extensionName Name of the Extension. - * @param forceDelete Delete the extension resource in Azure - not the normal asynchronous delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -190,8 +189,7 @@ SyncPoller, Void> beginDelete( String clusterRp, String clusterResourceName, String clusterName, - String extensionName, - Boolean forceDelete); + String extensionName); /** * Delete a Kubernetes Cluster Extension. This will cause the Agent to Uninstall the extension from the cluster. @@ -220,30 +218,6 @@ SyncPoller, Void> beginDelete( Boolean forceDelete, Context context); - /** - * Delete a Kubernetes Cluster Extension. This will cause the Agent to Uninstall the extension from the cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, - * provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param extensionName Name of the Extension. - * @param forceDelete Delete the extension resource in Azure - not the normal asynchronous delete. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String resourceGroupName, - String clusterRp, - String clusterResourceName, - String clusterName, - String extensionName, - Boolean forceDelete); - /** * Delete a Kubernetes Cluster Extension. This will cause the Agent to Uninstall the extension from the cluster. * diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/FluxConfigOperationStatusClient.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/FluxConfigOperationStatusClient.java index 813fe4c5623d9..bbb3a1f7d127e 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/FluxConfigOperationStatusClient.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/FluxConfigOperationStatusClient.java @@ -23,19 +23,21 @@ public interface FluxConfigOperationStatusClient { * @param clusterName The name of the kubernetes cluster. * @param fluxConfigurationName Name of the Flux Configuration. * @param operationId operation Id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return async Operation status. + * @return async Operation status along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner get( + Response getWithResponse( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, String fluxConfigurationName, - String operationId); + String operationId, + Context context); /** * Get Async Operation status. @@ -48,19 +50,17 @@ OperationStatusResultInner get( * @param clusterName The name of the kubernetes cluster. * @param fluxConfigurationName Name of the Flux Configuration. * @param operationId operation Id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return async Operation status along with {@link Response}. + * @return async Operation status. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( + OperationStatusResultInner get( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, String fluxConfigurationName, - String operationId, - Context context); + String operationId); } diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/FluxConfigurationsClient.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/FluxConfigurationsClient.java index 117c7f759de5e..43b4c260b7683 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/FluxConfigurationsClient.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/FluxConfigurationsClient.java @@ -26,18 +26,20 @@ public interface FluxConfigurationsClient { * provisionedClusters. * @param clusterName The name of the kubernetes cluster. * @param fluxConfigurationName Name of the Flux Configuration. + * @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 details of the Flux Configuration. + * @return details of the Flux Configuration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - FluxConfigurationInner get( + Response getWithResponse( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, - String fluxConfigurationName); + String fluxConfigurationName, + Context context); /** * Gets details of the Flux Configuration. @@ -49,20 +51,18 @@ FluxConfigurationInner get( * provisionedClusters. * @param clusterName The name of the kubernetes cluster. * @param fluxConfigurationName Name of the Flux Configuration. - * @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 details of the Flux Configuration along with {@link Response}. + * @return details of the Flux Configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( + FluxConfigurationInner get( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, - String fluxConfigurationName, - Context context); + String fluxConfigurationName); /** * Create a new Kubernetes Flux Configuration. @@ -283,7 +283,6 @@ FluxConfigurationInner update( * provisionedClusters. * @param clusterName The name of the kubernetes cluster. * @param fluxConfigurationName Name of the Flux Configuration. - * @param forceDelete Delete the extension resource in Azure - not the normal asynchronous delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -295,8 +294,7 @@ SyncPoller, Void> beginDelete( String clusterRp, String clusterResourceName, String clusterName, - String fluxConfigurationName, - Boolean forceDelete); + String fluxConfigurationName); /** * This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source @@ -326,31 +324,6 @@ SyncPoller, Void> beginDelete( Boolean forceDelete, Context context); - /** - * This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source - * repo. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, - * provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param fluxConfigurationName Name of the Flux Configuration. - * @param forceDelete Delete the extension resource in Azure - not the normal asynchronous delete. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete( - String resourceGroupName, - String clusterRp, - String clusterResourceName, - String clusterName, - String fluxConfigurationName, - Boolean forceDelete); - /** * This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source * repo. diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/OperationStatusClient.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/OperationStatusClient.java index 70a8eaa3a7ddf..cb51a6de82e3e 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/OperationStatusClient.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/OperationStatusClient.java @@ -24,19 +24,21 @@ public interface OperationStatusClient { * @param clusterName The name of the kubernetes cluster. * @param extensionName Name of the Extension. * @param operationId operation Id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return async Operation status. + * @return async Operation status along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - OperationStatusResultInner get( + Response getWithResponse( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, String extensionName, - String operationId); + String operationId, + Context context); /** * Get Async Operation status. @@ -49,21 +51,19 @@ OperationStatusResultInner get( * @param clusterName The name of the kubernetes cluster. * @param extensionName Name of the Extension. * @param operationId operation Id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return async Operation status along with {@link Response}. + * @return async Operation status. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( + OperationStatusResultInner get( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, String extensionName, - String operationId, - Context context); + String operationId); /** * List Async Operations, currently in progress, in a cluster. diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/SourceControlConfigurationsClient.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/SourceControlConfigurationsClient.java index 64eb81473e4f4..c3a0da1f4e6a6 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/SourceControlConfigurationsClient.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/SourceControlConfigurationsClient.java @@ -25,18 +25,20 @@ public interface SourceControlConfigurationsClient { * provisionedClusters. * @param clusterName The name of the kubernetes cluster. * @param sourceControlConfigurationName Name of the Source Control Configuration. + * @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 details of the Source Control Configuration. + * @return details of the Source Control Configuration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - SourceControlConfigurationInner get( + Response getWithResponse( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, - String sourceControlConfigurationName); + String sourceControlConfigurationName, + Context context); /** * Gets details of the Source Control Configuration. @@ -48,20 +50,18 @@ SourceControlConfigurationInner get( * provisionedClusters. * @param clusterName The name of the kubernetes cluster. * @param sourceControlConfigurationName Name of the Source Control Configuration. - * @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 details of the Source Control Configuration along with {@link Response}. + * @return details of the Source Control Configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( + SourceControlConfigurationInner get( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, - String sourceControlConfigurationName, - Context context); + String sourceControlConfigurationName); /** * Create a new Kubernetes Source Control Configuration. @@ -74,19 +74,21 @@ Response getWithResponse( * @param clusterName The name of the kubernetes cluster. * @param sourceControlConfigurationName Name of the Source Control Configuration. * @param sourceControlConfiguration Properties necessary to Create KubernetesConfiguration. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the SourceControl Configuration object returned in Get & Put response. + * @return the SourceControl Configuration object returned in Get & Put response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - SourceControlConfigurationInner createOrUpdate( + Response createOrUpdateWithResponse( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, String sourceControlConfigurationName, - SourceControlConfigurationInner sourceControlConfiguration); + SourceControlConfigurationInner sourceControlConfiguration, + Context context); /** * Create a new Kubernetes Source Control Configuration. @@ -99,21 +101,19 @@ SourceControlConfigurationInner createOrUpdate( * @param clusterName The name of the kubernetes cluster. * @param sourceControlConfigurationName Name of the Source Control Configuration. * @param sourceControlConfiguration Properties necessary to Create KubernetesConfiguration. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the SourceControl Configuration object returned in Get & Put response along with {@link Response}. + * @return the SourceControl Configuration object returned in Get & Put response. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( + SourceControlConfigurationInner createOrUpdate( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, String sourceControlConfigurationName, - SourceControlConfigurationInner sourceControlConfiguration, - Context context); + SourceControlConfigurationInner sourceControlConfiguration); /** * This will delete the YAML file used to set up the Source control configuration, thus stopping future sync from diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/ExtensionInner.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/ExtensionInner.java index 1cc5344085846..27d3c54288ce3 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/ExtensionInner.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/ExtensionInner.java @@ -11,6 +11,7 @@ import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionPropertiesAksAssignedIdentity; import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionStatus; import com.azure.resourcemanager.kubernetesconfiguration.models.Identity; +import com.azure.resourcemanager.kubernetesconfiguration.models.Plan; import com.azure.resourcemanager.kubernetesconfiguration.models.ProvisioningState; import com.azure.resourcemanager.kubernetesconfiguration.models.Scope; import com.fasterxml.jackson.annotation.JsonProperty; @@ -39,6 +40,16 @@ public final class ExtensionInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /* + * The plan information. + */ + @JsonProperty(value = "plan") + private Plan plan; + + /** Creates an instance of ExtensionInner class. */ + public ExtensionInner() { + } + /** * Get the innerProperties property: Properties of an Extension resource. * @@ -78,6 +89,26 @@ public SystemData systemData() { return this.systemData; } + /** + * Get the plan property: The plan information. + * + * @return the plan value. + */ + public Plan plan() { + return this.plan; + } + + /** + * Set the plan property: The plan information. + * + * @param plan the plan value to set. + * @return the ExtensionInner object itself. + */ + public ExtensionInner withPlan(Plan plan) { + this.plan = plan; + return this; + } + /** * Get the extensionType property: Type of the Extension, of which this resource is an instance of. It must be one * of the Extension Types registered with Microsoft.KubernetesConfiguration by the Extension publisher. @@ -252,12 +283,12 @@ public ExtensionInner withConfigurationProtectedSettings(Map con } /** - * Get the installedVersion property: Installed version of the extension. + * Get the currentVersion property: Currently installed version of the extension. * - * @return the installedVersion value. + * @return the currentVersion value. */ - public String installedVersion() { - return this.innerProperties() == null ? null : this.innerProperties().installedVersion(); + public String currentVersion() { + return this.innerProperties() == null ? null : this.innerProperties().currentVersion(); } /** @@ -342,6 +373,15 @@ public ExtensionInner withAksAssignedIdentity(ExtensionPropertiesAksAssignedIden return this; } + /** + * Get the isSystemExtension property: Flag to note if this extension is a system extension. + * + * @return the isSystemExtension value. + */ + public Boolean isSystemExtension() { + return this.innerProperties() == null ? null : this.innerProperties().isSystemExtension(); + } + /** * Validates the instance. * @@ -354,5 +394,8 @@ public void validate() { if (identity() != null) { identity().validate(); } + if (plan() != null) { + plan().validate(); + } } } diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/ExtensionProperties.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/ExtensionProperties.java index b82bd241e0783..902af328187e5 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/ExtensionProperties.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/ExtensionProperties.java @@ -19,30 +19,28 @@ @Fluent public final class ExtensionProperties { /* - * Type of the Extension, of which this resource is an instance of. It - * must be one of the Extension Types registered with - * Microsoft.KubernetesConfiguration by the Extension publisher. + * Type of the Extension, of which this resource is an instance of. It must be one of the Extension Types + * registered with Microsoft.KubernetesConfiguration by the Extension publisher. */ @JsonProperty(value = "extensionType") private String extensionType; /* - * Flag to note if this extension participates in auto upgrade of minor - * version, or not. + * Flag to note if this extension participates in auto upgrade of minor version, or not. */ @JsonProperty(value = "autoUpgradeMinorVersion") private Boolean autoUpgradeMinorVersion; /* - * ReleaseTrain this extension participates in for auto-upgrade (e.g. - * Stable, Preview, etc.) - only if autoUpgradeMinorVersion is 'true'. + * ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if + * autoUpgradeMinorVersion is 'true'. */ @JsonProperty(value = "releaseTrain") private String releaseTrain; /* - * User-specified version of the extension for this extension to 'pin'. To - * use 'version', autoUpgradeMinorVersion must be 'false'. + * User-specified version of the extension for this extension to 'pin'. To use 'version', autoUpgradeMinorVersion + * must be 'false'. */ @JsonProperty(value = "version") private String version; @@ -54,26 +52,24 @@ public final class ExtensionProperties { private Scope scope; /* - * Configuration settings, as name-value pairs for configuring this - * extension. + * Configuration settings, as name-value pairs for configuring this extension. */ @JsonProperty(value = "configurationSettings") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map configurationSettings; /* - * Configuration settings that are sensitive, as name-value pairs for - * configuring this extension. + * Configuration settings that are sensitive, as name-value pairs for configuring this extension. */ @JsonProperty(value = "configurationProtectedSettings") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map configurationProtectedSettings; /* - * Installed version of the extension. + * Currently installed version of the extension. */ - @JsonProperty(value = "installedVersion", access = JsonProperty.Access.WRITE_ONLY) - private String installedVersion; + @JsonProperty(value = "currentVersion", access = JsonProperty.Access.WRITE_ONLY) + private String currentVersion; /* * Status of installation of this extension. @@ -112,6 +108,16 @@ public final class ExtensionProperties { @JsonProperty(value = "aksAssignedIdentity") private ExtensionPropertiesAksAssignedIdentity aksAssignedIdentity; + /* + * Flag to note if this extension is a system extension + */ + @JsonProperty(value = "isSystemExtension", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isSystemExtension; + + /** Creates an instance of ExtensionProperties class. */ + public ExtensionProperties() { + } + /** * Get the extensionType property: Type of the Extension, of which this resource is an instance of. It must be one * of the Extension Types registered with Microsoft.KubernetesConfiguration by the Extension publisher. @@ -265,12 +271,12 @@ public ExtensionProperties withConfigurationProtectedSettings(Map kustomizations; /* - * Key-value pairs of protected configuration settings for the - * configuration + * Key-value pairs of protected configuration settings for the configuration */ @JsonProperty(value = "configurationProtectedSettings") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map configurationProtectedSettings; + /** Creates an instance of FluxConfigurationPatchProperties class. */ + public FluxConfigurationPatchProperties() { + } + /** * Get the sourceKind property: Source Kind to pull the configuration data from. * @@ -139,6 +147,26 @@ public FluxConfigurationPatchProperties withBucket(BucketPatchDefinition bucket) return this; } + /** + * Get the azureBlob property: Parameters to reconcile to the AzureBlob source kind type. + * + * @return the azureBlob value. + */ + public AzureBlobPatchDefinition azureBlob() { + return this.azureBlob; + } + + /** + * Set the azureBlob property: Parameters to reconcile to the AzureBlob source kind type. + * + * @param azureBlob the azureBlob value to set. + * @return the FluxConfigurationPatchProperties object itself. + */ + public FluxConfigurationPatchProperties withAzureBlob(AzureBlobPatchDefinition azureBlob) { + this.azureBlob = azureBlob; + return this; + } + /** * Get the kustomizations property: Array of kustomizations used to reconcile the artifact pulled by the source type * on the cluster. @@ -197,6 +225,9 @@ public void validate() { if (bucket() != null) { bucket().validate(); } + if (azureBlob() != null) { + azureBlob().validate(); + } if (kustomizations() != null) { kustomizations() .values() diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/FluxConfigurationProperties.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/FluxConfigurationProperties.java index 4b0c1fbfaf127..eda7cca64071a 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/FluxConfigurationProperties.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/FluxConfigurationProperties.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.kubernetesconfiguration.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.kubernetesconfiguration.models.AzureBlobDefinition; import com.azure.resourcemanager.kubernetesconfiguration.models.BucketDefinition; import com.azure.resourcemanager.kubernetesconfiguration.models.FluxComplianceState; import com.azure.resourcemanager.kubernetesconfiguration.models.GitRepositoryDefinition; @@ -29,8 +30,8 @@ public final class FluxConfigurationProperties { private ScopeType scope; /* - * The namespace to which this configuration is installed to. Maximum of - * 253 lower case alphanumeric characters, hyphen and period only. + * The namespace to which this configuration is installed to. Maximum of 253 lower case alphanumeric characters, + * hyphen and period only. */ @JsonProperty(value = "namespace") private String namespace; @@ -42,8 +43,7 @@ public final class FluxConfigurationProperties { private SourceKindType sourceKind; /* - * Whether this configuration should suspend its reconciliation of its - * kustomizations and sources. + * Whether this configuration should suspend its reconciliation of its kustomizations and sources. */ @JsonProperty(value = "suspend") private Boolean suspend; @@ -61,32 +61,34 @@ public final class FluxConfigurationProperties { private BucketDefinition bucket; /* - * Array of kustomizations used to reconcile the artifact pulled by the - * source type on the cluster. + * Parameters to reconcile to the AzureBlob source kind type. + */ + @JsonProperty(value = "azureBlob") + private AzureBlobDefinition azureBlob; + + /* + * Array of kustomizations used to reconcile the artifact pulled by the source type on the cluster. */ @JsonProperty(value = "kustomizations") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map kustomizations; /* - * Key-value pairs of protected configuration settings for the - * configuration + * Key-value pairs of protected configuration settings for the configuration */ @JsonProperty(value = "configurationProtectedSettings") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map configurationProtectedSettings; /* - * Statuses of the Flux Kubernetes resources created by the - * fluxConfiguration or created by the managed objects provisioned by the - * fluxConfiguration. + * Statuses of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed objects + * provisioned by the fluxConfiguration. */ @JsonProperty(value = "statuses", access = JsonProperty.Access.WRITE_ONLY) private List statuses; /* - * Public Key associated with this fluxConfiguration (either generated - * within the cluster or provided by the user). + * Public Key associated with this fluxConfiguration (either generated within the cluster or provided by the user). */ @JsonProperty(value = "repositoryPublicKey", access = JsonProperty.Access.WRITE_ONLY) private String repositoryPublicKey; @@ -104,15 +106,14 @@ public final class FluxConfigurationProperties { private OffsetDateTime sourceUpdatedAt; /* - * Datetime the fluxConfiguration synced its status on the cluster with - * Azure. + * Datetime the fluxConfiguration synced its status on the cluster with Azure. */ @JsonProperty(value = "statusUpdatedAt", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime statusUpdatedAt; /* - * Combined status of the Flux Kubernetes resources created by the - * fluxConfiguration or created by the managed objects. + * Combined status of the Flux Kubernetes resources created by the fluxConfiguration or created by the managed + * objects. */ @JsonProperty(value = "complianceState", access = JsonProperty.Access.WRITE_ONLY) private FluxComplianceState complianceState; @@ -129,6 +130,10 @@ public final class FluxConfigurationProperties { @JsonProperty(value = "errorMessage", access = JsonProperty.Access.WRITE_ONLY) private String errorMessage; + /** Creates an instance of FluxConfigurationProperties class. */ + public FluxConfigurationProperties() { + } + /** * Get the scope property: Scope at which the operator will be installed. * @@ -253,6 +258,26 @@ public FluxConfigurationProperties withBucket(BucketDefinition bucket) { return this; } + /** + * Get the azureBlob property: Parameters to reconcile to the AzureBlob source kind type. + * + * @return the azureBlob value. + */ + public AzureBlobDefinition azureBlob() { + return this.azureBlob; + } + + /** + * Set the azureBlob property: Parameters to reconcile to the AzureBlob source kind type. + * + * @param azureBlob the azureBlob value to set. + * @return the FluxConfigurationProperties object itself. + */ + public FluxConfigurationProperties withAzureBlob(AzureBlobDefinition azureBlob) { + this.azureBlob = azureBlob; + return this; + } + /** * Get the kustomizations property: Array of kustomizations used to reconcile the artifact pulled by the source type * on the cluster. @@ -385,6 +410,9 @@ public void validate() { if (bucket() != null) { bucket().validate(); } + if (azureBlob() != null) { + azureBlob().validate(); + } if (kustomizations() != null) { kustomizations() .values() diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/OperationStatusResultInner.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/OperationStatusResultInner.java index a7a34a1ffc188..1be67263e18ab 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/OperationStatusResultInner.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/OperationStatusResultInner.java @@ -45,6 +45,10 @@ public final class OperationStatusResultInner { @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) private ManagementError error; + /** Creates an instance of OperationStatusResultInner class. */ + public OperationStatusResultInner() { + } + /** * Get the id property: Fully qualified ID for the async operation. * diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/PatchExtensionProperties.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/PatchExtensionProperties.java index 681a2550def68..6ce76f0361c8c 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/PatchExtensionProperties.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/PatchExtensionProperties.java @@ -13,42 +13,43 @@ @Fluent public final class PatchExtensionProperties { /* - * Flag to note if this extension participates in auto upgrade of minor - * version, or not. + * Flag to note if this extension participates in auto upgrade of minor version, or not. */ @JsonProperty(value = "autoUpgradeMinorVersion") private Boolean autoUpgradeMinorVersion; /* - * ReleaseTrain this extension participates in for auto-upgrade (e.g. - * Stable, Preview, etc.) - only if autoUpgradeMinorVersion is 'true'. + * ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, Preview, etc.) - only if + * autoUpgradeMinorVersion is 'true'. */ @JsonProperty(value = "releaseTrain") private String releaseTrain; /* - * Version of the extension for this extension, if it is 'pinned' to a - * specific version. autoUpgradeMinorVersion must be 'false'. + * Version of the extension for this extension, if it is 'pinned' to a specific version. autoUpgradeMinorVersion + * must be 'false'. */ @JsonProperty(value = "version") private String version; /* - * Configuration settings, as name-value pairs for configuring this - * extension. + * Configuration settings, as name-value pairs for configuring this extension. */ @JsonProperty(value = "configurationSettings") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map configurationSettings; /* - * Configuration settings that are sensitive, as name-value pairs for - * configuring this extension. + * Configuration settings that are sensitive, as name-value pairs for configuring this extension. */ @JsonProperty(value = "configurationProtectedSettings") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map configurationProtectedSettings; + /** Creates an instance of PatchExtensionProperties class. */ + public PatchExtensionProperties() { + } + /** * Get the autoUpgradeMinorVersion property: Flag to note if this extension participates in auto upgrade of minor * version, or not. diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/ResourceProviderOperationInner.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/ResourceProviderOperationInner.java index de7b5ec6590f9..ab8493f57afc8 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/ResourceProviderOperationInner.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/ResourceProviderOperationInner.java @@ -35,6 +35,10 @@ public final class ResourceProviderOperationInner { @JsonProperty(value = "origin", access = JsonProperty.Access.WRITE_ONLY) private String origin; + /** Creates an instance of ResourceProviderOperationInner class. */ + public ResourceProviderOperationInner() { + } + /** * Get the name property: Operation name, in format of {provider}/{resource}/{operation}. * diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/SourceControlConfigurationInner.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/SourceControlConfigurationInner.java index 241ab0e5494d9..db2bcb9ea4d0f 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/SourceControlConfigurationInner.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/SourceControlConfigurationInner.java @@ -31,6 +31,10 @@ public final class SourceControlConfigurationInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of SourceControlConfigurationInner class. */ + public SourceControlConfigurationInner() { + } + /** * Get the innerProperties property: Properties to create a Source Control Configuration resource. * diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/SourceControlConfigurationProperties.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/SourceControlConfigurationProperties.java index 0415bff3cf908..856c56c8d10c5 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/SourceControlConfigurationProperties.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/SourceControlConfigurationProperties.java @@ -24,8 +24,8 @@ public final class SourceControlConfigurationProperties { private String repositoryUrl; /* - * The namespace to which this operator is installed to. Maximum of 253 - * lower case alphanumeric characters, hyphen and period only. + * The namespace to which this operator is installed to. Maximum of 253 lower case alphanumeric characters, hyphen + * and period only. */ @JsonProperty(value = "operatorNamespace") private String operatorNamespace; @@ -49,8 +49,7 @@ public final class SourceControlConfigurationProperties { private String operatorParams; /* - * Name-value pairs of protected configuration settings for the - * configuration + * Name-value pairs of protected configuration settings for the configuration */ @JsonProperty(value = "configurationProtectedSettings") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) @@ -63,15 +62,14 @@ public final class SourceControlConfigurationProperties { private OperatorScopeType operatorScope; /* - * Public Key associated with this SourceControl configuration (either - * generated within the cluster or provided by the user). + * Public Key associated with this SourceControl configuration (either generated within the cluster or provided by + * the user). */ @JsonProperty(value = "repositoryPublicKey", access = JsonProperty.Access.WRITE_ONLY) private String repositoryPublicKey; /* - * Base64-encoded known_hosts contents containing public SSH keys required - * to access private Git instances + * Base64-encoded known_hosts contents containing public SSH keys required to access private Git instances */ @JsonProperty(value = "sshKnownHostsContents") private String sshKnownHostsContents; @@ -100,6 +98,10 @@ public final class SourceControlConfigurationProperties { @JsonProperty(value = "complianceStatus", access = JsonProperty.Access.WRITE_ONLY) private ComplianceStatus complianceStatus; + /** Creates an instance of SourceControlConfigurationProperties class. */ + public SourceControlConfigurationProperties() { + } + /** * Get the repositoryUrl property: Url of the SourceControl Repository. * diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ExtensionImpl.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ExtensionImpl.java index cf7fe1877486f..d564f7fc0c38f 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ExtensionImpl.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ExtensionImpl.java @@ -11,6 +11,7 @@ import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionPropertiesAksAssignedIdentity; import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionStatus; import com.azure.resourcemanager.kubernetesconfiguration.models.Identity; +import com.azure.resourcemanager.kubernetesconfiguration.models.Plan; import com.azure.resourcemanager.kubernetesconfiguration.models.ProvisioningState; import com.azure.resourcemanager.kubernetesconfiguration.models.Scope; import java.util.Collections; @@ -49,6 +50,10 @@ public SystemData systemData() { return this.innerModel().systemData(); } + public Plan plan() { + return this.innerModel().plan(); + } + public String extensionType() { return this.innerModel().extensionType(); } @@ -87,8 +92,8 @@ public Map configurationProtectedSettings() { } } - public String installedVersion() { - return this.innerModel().installedVersion(); + public String currentVersion() { + return this.innerModel().currentVersion(); } public ProvisioningState provisioningState() { @@ -125,6 +130,10 @@ public ExtensionPropertiesAksAssignedIdentity aksAssignedIdentity() { return this.innerModel().aksAssignedIdentity(); } + public Boolean isSystemExtension() { + return this.innerModel().isSystemExtension(); + } + public ExtensionInner innerModel() { return this.innerObject; } diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ExtensionsClientImpl.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ExtensionsClientImpl.java index f60b928014c07..3074d2e235384 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ExtensionsClientImpl.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ExtensionsClientImpl.java @@ -65,7 +65,7 @@ public final class ExtensionsClientImpl implements ExtensionsClient { */ @Host("{$host}") @ServiceInterface(name = "SourceControlConfigu") - private interface ExtensionsService { + public interface ExtensionsService { @Headers({"Content-Type: application/json"}) @Put( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}" @@ -130,7 +130,7 @@ Mono>> delete( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}" + "/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions" + "/{extensionName}") - @ExpectedResponses({202}) + @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> update( @HostParam("$host") String endpoint, @@ -425,8 +425,8 @@ public SyncPoller, ExtensionInner> beginCreate( String clusterName, String extensionName, ExtensionInner extension) { - return beginCreateAsync( - resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, extension) + return this + .beginCreateAsync(resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, extension) .getSyncPoller(); } @@ -456,7 +456,8 @@ public SyncPoller, ExtensionInner> beginCreate( String extensionName, ExtensionInner extension, Context context) { - return beginCreateAsync( + return this + .beginCreateAsync( resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, extension, context) .getSyncPoller(); } @@ -744,14 +745,7 @@ private Mono getAsync( String clusterName, String extensionName) { return getWithResponseAsync(resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -764,19 +758,23 @@ private Mono getAsync( * provisionedClusters. * @param clusterName The name of the kubernetes cluster. * @param extensionName Name of the Extension. + * @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 kubernetes Cluster Extension. + * @return kubernetes Cluster Extension along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ExtensionInner get( + public Response getWithResponse( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, - String extensionName) { - return getAsync(resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName).block(); + String extensionName, + Context context) { + return getWithResponseAsync( + resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, context) + .block(); } /** @@ -789,23 +787,21 @@ public ExtensionInner get( * provisionedClusters. * @param clusterName The name of the kubernetes cluster. * @param extensionName Name of the Extension. - * @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 kubernetes Cluster Extension along with {@link Response}. + * @return kubernetes Cluster Extension. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( + public ExtensionInner get( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, - String extensionName, - Context context) { - return getWithResponseAsync( - resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, context) - .block(); + String extensionName) { + return getWithResponse( + resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, Context.NONE) + .getValue(); } /** @@ -986,6 +982,38 @@ private PollerFlux, Void> beginDeleteAsync( mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } + /** + * Delete a Kubernetes Cluster Extension. This will cause the Agent to Uninstall the extension from the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, + * Microsoft.HybridContainerService. + * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, + * provisionedClusters. + * @param clusterName The name of the kubernetes cluster. + * @param extensionName Name of the Extension. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, + String clusterRp, + String clusterResourceName, + String clusterName, + String extensionName) { + final Boolean forceDelete = null; + Mono>> mono = + deleteWithResponseAsync( + resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, forceDelete); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + /** * Delete a Kubernetes Cluster Extension. This will cause the Agent to Uninstall the extension from the cluster. * @@ -1031,7 +1059,6 @@ private PollerFlux, Void> beginDeleteAsync( * provisionedClusters. * @param clusterName The name of the kubernetes cluster. * @param extensionName Name of the Extension. - * @param forceDelete Delete the extension resource in Azure - not the normal asynchronous delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1043,9 +1070,10 @@ public SyncPoller, Void> beginDelete( String clusterRp, String clusterResourceName, String clusterName, - String extensionName, - Boolean forceDelete) { - return beginDeleteAsync( + String extensionName) { + final Boolean forceDelete = null; + return this + .beginDeleteAsync( resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, forceDelete) .getSyncPoller(); } @@ -1076,7 +1104,8 @@ public SyncPoller, Void> beginDelete( String extensionName, Boolean forceDelete, Context context) { - return beginDeleteAsync( + return this + .beginDeleteAsync( resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, forceDelete, context) .getSyncPoller(); } @@ -1172,32 +1201,6 @@ private Mono deleteAsync( .flatMap(this.client::getLroFinalResultOrError); } - /** - * Delete a Kubernetes Cluster Extension. This will cause the Agent to Uninstall the extension from the cluster. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, - * provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param extensionName Name of the Extension. - * @param forceDelete Delete the extension resource in Azure - not the normal asynchronous delete. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, - String clusterRp, - String clusterResourceName, - String clusterName, - String extensionName, - Boolean forceDelete) { - deleteAsync(resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, forceDelete).block(); - } - /** * Delete a Kubernetes Cluster Extension. This will cause the Agent to Uninstall the extension from the cluster. * @@ -1504,7 +1507,8 @@ public SyncPoller, ExtensionInner> beginUpdate( String clusterName, String extensionName, PatchExtension patchExtension) { - return beginUpdateAsync( + return this + .beginUpdateAsync( resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, patchExtension) .getSyncPoller(); } @@ -1535,7 +1539,8 @@ public SyncPoller, ExtensionInner> beginUpdate( String extensionName, PatchExtension patchExtension, Context context) { - return beginUpdateAsync( + return this + .beginUpdateAsync( resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, patchExtension, context) .getSyncPoller(); } @@ -1891,7 +1896,8 @@ public PagedIterable list( /** * 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. @@ -1927,7 +1933,8 @@ private Mono> listNextSinglePageAsync(String nextL /** * 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. diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ExtensionsImpl.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ExtensionsImpl.java index 26b7631140227..a934cfb974f5e 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ExtensionsImpl.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ExtensionsImpl.java @@ -67,21 +67,6 @@ public Extension create( } } - public Extension get( - String resourceGroupName, - String clusterRp, - String clusterResourceName, - String clusterName, - String extensionName) { - ExtensionInner inner = - this.serviceClient().get(resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName); - if (inner != null) { - return new ExtensionImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String clusterRp, @@ -105,16 +90,19 @@ public Response getWithResponse( } } - public void delete( + public Extension get( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, - String extensionName, - Boolean forceDelete) { - this - .serviceClient() - .delete(resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, forceDelete); + String extensionName) { + ExtensionInner inner = + this.serviceClient().get(resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName); + if (inner != null) { + return new ExtensionImpl(inner, this.manager()); + } else { + return null; + } } public void delete( diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/FluxConfigOperationStatusClientImpl.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/FluxConfigOperationStatusClientImpl.java index 7dee5d2f41c69..ab214281a879f 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/FluxConfigOperationStatusClientImpl.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/FluxConfigOperationStatusClientImpl.java @@ -52,7 +52,7 @@ public final class FluxConfigOperationStatusClientImpl implements FluxConfigOper */ @Host("{$host}") @ServiceInterface(name = "SourceControlConfigu") - private interface FluxConfigOperationStatusService { + public interface FluxConfigOperationStatusService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}" @@ -253,14 +253,7 @@ private Mono getAsync( String operationId) { return getWithResponseAsync( resourceGroupName, clusterRp, clusterResourceName, clusterName, fluxConfigurationName, operationId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -274,21 +267,29 @@ private Mono getAsync( * @param clusterName The name of the kubernetes cluster. * @param fluxConfigurationName Name of the Flux Configuration. * @param operationId operation Id. + * @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 async Operation status. + * @return async Operation status along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner get( + public Response getWithResponse( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, String fluxConfigurationName, - String operationId) { - return getAsync( - resourceGroupName, clusterRp, clusterResourceName, clusterName, fluxConfigurationName, operationId) + String operationId, + Context context) { + return getWithResponseAsync( + resourceGroupName, + clusterRp, + clusterResourceName, + clusterName, + fluxConfigurationName, + operationId, + context) .block(); } @@ -303,29 +304,27 @@ public OperationStatusResultInner get( * @param clusterName The name of the kubernetes cluster. * @param fluxConfigurationName Name of the Flux Configuration. * @param operationId operation Id. - * @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 async Operation status along with {@link Response}. + * @return async Operation status. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( + public OperationStatusResultInner get( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, String fluxConfigurationName, - String operationId, - Context context) { - return getWithResponseAsync( + String operationId) { + return getWithResponse( resourceGroupName, clusterRp, clusterResourceName, clusterName, fluxConfigurationName, operationId, - context) - .block(); + Context.NONE) + .getValue(); } } diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/FluxConfigOperationStatusImpl.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/FluxConfigOperationStatusImpl.java index 5372e3afdb0ee..27114eaed2891 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/FluxConfigOperationStatusImpl.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/FluxConfigOperationStatusImpl.java @@ -27,25 +27,6 @@ public FluxConfigOperationStatusImpl( this.serviceManager = serviceManager; } - public OperationStatusResult get( - String resourceGroupName, - String clusterRp, - String clusterResourceName, - String clusterName, - String fluxConfigurationName, - String operationId) { - OperationStatusResultInner inner = - this - .serviceClient() - .get( - resourceGroupName, clusterRp, clusterResourceName, clusterName, fluxConfigurationName, operationId); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String clusterRp, @@ -76,6 +57,25 @@ public Response getWithResponse( } } + public OperationStatusResult get( + String resourceGroupName, + String clusterRp, + String clusterResourceName, + String clusterName, + String fluxConfigurationName, + String operationId) { + OperationStatusResultInner inner = + this + .serviceClient() + .get( + resourceGroupName, clusterRp, clusterResourceName, clusterName, fluxConfigurationName, operationId); + if (inner != null) { + return new OperationStatusResultImpl(inner, this.manager()); + } else { + return null; + } + } + private FluxConfigOperationStatusClient serviceClient() { return this.innerClient; } diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/FluxConfigurationImpl.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/FluxConfigurationImpl.java index 3a489ff316689..f3d5621de2450 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/FluxConfigurationImpl.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/FluxConfigurationImpl.java @@ -6,6 +6,7 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.FluxConfigurationInner; +import com.azure.resourcemanager.kubernetesconfiguration.models.AzureBlobDefinition; import com.azure.resourcemanager.kubernetesconfiguration.models.BucketDefinition; import com.azure.resourcemanager.kubernetesconfiguration.models.FluxComplianceState; import com.azure.resourcemanager.kubernetesconfiguration.models.FluxConfiguration; @@ -72,6 +73,10 @@ public BucketDefinition bucket() { return this.innerModel().bucket(); } + public AzureBlobDefinition azureBlob() { + return this.innerModel().azureBlob(); + } + public Map kustomizations() { Map inner = this.innerModel().kustomizations(); if (inner != null) { diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/FluxConfigurationsClientImpl.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/FluxConfigurationsClientImpl.java index 231fdeabd1bcc..629b263cb1db4 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/FluxConfigurationsClientImpl.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/FluxConfigurationsClientImpl.java @@ -65,7 +65,7 @@ public final class FluxConfigurationsClientImpl implements FluxConfigurationsCli */ @Host("{$host}") @ServiceInterface(name = "SourceControlConfigu") - private interface FluxConfigurationsService { + public interface FluxConfigurationsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}" @@ -110,7 +110,7 @@ Mono>> createOrUpdate( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}" + "/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/fluxConfigurations" + "/{fluxConfigurationName}") - @ExpectedResponses({202}) + @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> update( @HostParam("$host") String endpoint, @@ -338,14 +338,7 @@ private Mono getAsync( String fluxConfigurationName) { return getWithResponseAsync( resourceGroupName, clusterRp, clusterResourceName, clusterName, fluxConfigurationName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -358,19 +351,23 @@ private Mono getAsync( * provisionedClusters. * @param clusterName The name of the kubernetes cluster. * @param fluxConfigurationName Name of the Flux Configuration. + * @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 details of the Flux Configuration. + * @return details of the Flux Configuration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public FluxConfigurationInner get( + public Response getWithResponse( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, - String fluxConfigurationName) { - return getAsync(resourceGroupName, clusterRp, clusterResourceName, clusterName, fluxConfigurationName).block(); + String fluxConfigurationName, + Context context) { + return getWithResponseAsync( + resourceGroupName, clusterRp, clusterResourceName, clusterName, fluxConfigurationName, context) + .block(); } /** @@ -383,23 +380,21 @@ public FluxConfigurationInner get( * provisionedClusters. * @param clusterName The name of the kubernetes cluster. * @param fluxConfigurationName Name of the Flux Configuration. - * @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 details of the Flux Configuration along with {@link Response}. + * @return details of the Flux Configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( + public FluxConfigurationInner get( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, - String fluxConfigurationName, - Context context) { - return getWithResponseAsync( - resourceGroupName, clusterRp, clusterResourceName, clusterName, fluxConfigurationName, context) - .block(); + String fluxConfigurationName) { + return getWithResponse( + resourceGroupName, clusterRp, clusterResourceName, clusterName, fluxConfigurationName, Context.NONE) + .getValue(); } /** @@ -675,7 +670,8 @@ public SyncPoller, FluxConfigurationInner> be String clusterName, String fluxConfigurationName, FluxConfigurationInner fluxConfiguration) { - return beginCreateOrUpdateAsync( + return this + .beginCreateOrUpdateAsync( resourceGroupName, clusterRp, clusterResourceName, @@ -711,7 +707,8 @@ public SyncPoller, FluxConfigurationInner> be String fluxConfigurationName, FluxConfigurationInner fluxConfiguration, Context context) { - return beginCreateOrUpdateAsync( + return this + .beginCreateOrUpdateAsync( resourceGroupName, clusterRp, clusterResourceName, @@ -1143,7 +1140,8 @@ public SyncPoller, FluxConfigurationInner> be String clusterName, String fluxConfigurationName, FluxConfigurationPatch fluxConfigurationPatch) { - return beginUpdateAsync( + return this + .beginUpdateAsync( resourceGroupName, clusterRp, clusterResourceName, @@ -1179,7 +1177,8 @@ public SyncPoller, FluxConfigurationInner> be String fluxConfigurationName, FluxConfigurationPatch fluxConfigurationPatch, Context context) { - return beginUpdateAsync( + return this + .beginUpdateAsync( resourceGroupName, clusterRp, clusterResourceName, @@ -1519,6 +1518,39 @@ private PollerFlux, Void> beginDeleteAsync( mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } + /** + * This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source + * repo. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, + * Microsoft.HybridContainerService. + * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, + * provisionedClusters. + * @param clusterName The name of the kubernetes cluster. + * @param fluxConfigurationName Name of the Flux Configuration. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, + String clusterRp, + String clusterResourceName, + String clusterName, + String fluxConfigurationName) { + final Boolean forceDelete = null; + Mono>> mono = + deleteWithResponseAsync( + resourceGroupName, clusterRp, clusterResourceName, clusterName, fluxConfigurationName, forceDelete); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + /** * This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source * repo. @@ -1572,7 +1604,6 @@ private PollerFlux, Void> beginDeleteAsync( * provisionedClusters. * @param clusterName The name of the kubernetes cluster. * @param fluxConfigurationName Name of the Flux Configuration. - * @param forceDelete Delete the extension resource in Azure - not the normal asynchronous delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1584,9 +1615,10 @@ public SyncPoller, Void> beginDelete( String clusterRp, String clusterResourceName, String clusterName, - String fluxConfigurationName, - Boolean forceDelete) { - return beginDeleteAsync( + String fluxConfigurationName) { + final Boolean forceDelete = null; + return this + .beginDeleteAsync( resourceGroupName, clusterRp, clusterResourceName, clusterName, fluxConfigurationName, forceDelete) .getSyncPoller(); } @@ -1618,7 +1650,8 @@ public SyncPoller, Void> beginDelete( String fluxConfigurationName, Boolean forceDelete, Context context) { - return beginDeleteAsync( + return this + .beginDeleteAsync( resourceGroupName, clusterRp, clusterResourceName, @@ -1729,34 +1762,6 @@ private Mono deleteAsync( .flatMap(this.client::getLroFinalResultOrError); } - /** - * This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source - * repo. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, - * provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param fluxConfigurationName Name of the Flux Configuration. - * @param forceDelete Delete the extension resource in Azure - not the normal asynchronous delete. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete( - String resourceGroupName, - String clusterRp, - String clusterResourceName, - String clusterName, - String fluxConfigurationName, - Boolean forceDelete) { - deleteAsync(resourceGroupName, clusterRp, clusterResourceName, clusterName, fluxConfigurationName, forceDelete) - .block(); - } - /** * This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source * repo. @@ -2050,7 +2055,8 @@ public PagedIterable list( /** * 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. @@ -2086,7 +2092,8 @@ private Mono> listNextSinglePageAsync(Stri /** * 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. diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/FluxConfigurationsImpl.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/FluxConfigurationsImpl.java index db1a4e7a1face..143916f663de7 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/FluxConfigurationsImpl.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/FluxConfigurationsImpl.java @@ -29,41 +29,41 @@ public FluxConfigurationsImpl( this.serviceManager = serviceManager; } - public FluxConfiguration get( + public Response getWithResponse( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, - String fluxConfigurationName) { - FluxConfigurationInner inner = + String fluxConfigurationName, + Context context) { + Response inner = this .serviceClient() - .get(resourceGroupName, clusterRp, clusterResourceName, clusterName, fluxConfigurationName); + .getWithResponse( + resourceGroupName, clusterRp, clusterResourceName, clusterName, fluxConfigurationName, context); if (inner != null) { - return new FluxConfigurationImpl(inner, this.manager()); + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new FluxConfigurationImpl(inner.getValue(), this.manager())); } else { return null; } } - public Response getWithResponse( + public FluxConfiguration get( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, - String fluxConfigurationName, - Context context) { - Response inner = + String fluxConfigurationName) { + FluxConfigurationInner inner = this .serviceClient() - .getWithResponse( - resourceGroupName, clusterRp, clusterResourceName, clusterName, fluxConfigurationName, context); + .get(resourceGroupName, clusterRp, clusterResourceName, clusterName, fluxConfigurationName); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new FluxConfigurationImpl(inner.getValue(), this.manager())); + return new FluxConfigurationImpl(inner, this.manager()); } else { return null; } @@ -169,18 +169,6 @@ public FluxConfiguration update( } } - public void delete( - String resourceGroupName, - String clusterRp, - String clusterResourceName, - String clusterName, - String fluxConfigurationName, - Boolean forceDelete) { - this - .serviceClient() - .delete(resourceGroupName, clusterRp, clusterResourceName, clusterName, fluxConfigurationName, forceDelete); - } - public void delete( String resourceGroupName, String clusterRp, diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/OperationStatusClientImpl.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/OperationStatusClientImpl.java index 21c3c3f1a5f13..4080a729052ef 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/OperationStatusClientImpl.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/OperationStatusClientImpl.java @@ -55,7 +55,7 @@ public final class OperationStatusClientImpl implements OperationStatusClient { */ @Host("{$host}") @ServiceInterface(name = "SourceControlConfigu") - private interface OperationStatusService { + public interface OperationStatusService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}" @@ -281,14 +281,7 @@ private Mono getAsync( String operationId) { return getWithResponseAsync( resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, operationId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -302,20 +295,23 @@ private Mono getAsync( * @param clusterName The name of the kubernetes cluster. * @param extensionName Name of the Extension. * @param operationId operation Id. + * @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 async Operation status. + * @return async Operation status along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public OperationStatusResultInner get( + public Response getWithResponse( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, String extensionName, - String operationId) { - return getAsync(resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, operationId) + String operationId, + Context context) { + return getWithResponseAsync( + resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, operationId, context) .block(); } @@ -330,24 +326,28 @@ public OperationStatusResultInner get( * @param clusterName The name of the kubernetes cluster. * @param extensionName Name of the Extension. * @param operationId operation Id. - * @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 async Operation status along with {@link Response}. + * @return async Operation status. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( + public OperationStatusResultInner get( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, String extensionName, - String operationId, - Context context) { - return getWithResponseAsync( - resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, operationId, context) - .block(); + String operationId) { + return getWithResponse( + resourceGroupName, + clusterRp, + clusterResourceName, + clusterName, + extensionName, + operationId, + Context.NONE) + .getValue(); } /** @@ -579,7 +579,8 @@ public PagedIterable list( /** * 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. @@ -615,7 +616,8 @@ private Mono> listNextSinglePageAsync( /** * 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. diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/OperationStatusImpl.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/OperationStatusImpl.java index 9900341994922..00bd33353cee5 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/OperationStatusImpl.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/OperationStatusImpl.java @@ -28,24 +28,6 @@ public OperationStatusImpl( this.serviceManager = serviceManager; } - public OperationStatusResult get( - String resourceGroupName, - String clusterRp, - String clusterResourceName, - String clusterName, - String extensionName, - String operationId) { - OperationStatusResultInner inner = - this - .serviceClient() - .get(resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, operationId); - if (inner != null) { - return new OperationStatusResultImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String clusterRp, @@ -76,6 +58,24 @@ public Response getWithResponse( } } + public OperationStatusResult get( + String resourceGroupName, + String clusterRp, + String clusterResourceName, + String clusterName, + String extensionName, + String operationId) { + OperationStatusResultInner inner = + this + .serviceClient() + .get(resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, operationId); + if (inner != null) { + return new OperationStatusResultImpl(inner, this.manager()); + } else { + return null; + } + } + public PagedIterable list( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName) { PagedIterable inner = diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/OperationsClientImpl.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/OperationsClientImpl.java index 60e4105a9a08d..3ffeff9902b46 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/OperationsClientImpl.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/OperationsClientImpl.java @@ -55,7 +55,7 @@ public final class OperationsClientImpl implements OperationsClient { */ @Host("{$host}") @ServiceInterface(name = "SourceControlConfigu") - private interface OperationsService { + public interface OperationsService { @Headers({"Content-Type: application/json"}) @Get("/providers/Microsoft.KubernetesConfiguration/operations") @ExpectedResponses({200}) @@ -198,7 +198,8 @@ 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. @@ -234,7 +235,8 @@ private Mono> listNextSinglePageAs /** * 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. diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/SourceControlConfigurationClientBuilder.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/SourceControlConfigurationClientBuilder.java index 752d006aea87a..5992b14a97f1a 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/SourceControlConfigurationClientBuilder.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/SourceControlConfigurationClientBuilder.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.CookiePolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.AzureEnvironment; @@ -67,34 +66,34 @@ public SourceControlConfigurationClientBuilder environment(AzureEnvironment envi } /* - * The default poll interval for long-running operation + * The HTTP pipeline to send requests through */ - private Duration defaultPollInterval; + private HttpPipeline pipeline; /** - * Sets The default poll interval for long-running operation. + * Sets The HTTP pipeline to send requests through. * - * @param defaultPollInterval the defaultPollInterval value. + * @param pipeline the pipeline value. * @return the SourceControlConfigurationClientBuilder. */ - public SourceControlConfigurationClientBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; + public SourceControlConfigurationClientBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; return this; } /* - * The HTTP pipeline to send requests through + * The default poll interval for long-running operation */ - private HttpPipeline pipeline; + private Duration defaultPollInterval; /** - * Sets The HTTP pipeline to send requests through. + * Sets The default poll interval for long-running operation. * - * @param pipeline the pipeline value. + * @param defaultPollInterval the defaultPollInterval value. * @return the SourceControlConfigurationClientBuilder. */ - public SourceControlConfigurationClientBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; + public SourceControlConfigurationClientBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; return this; } @@ -120,27 +119,26 @@ public SourceControlConfigurationClientBuilder serializerAdapter(SerializerAdapt * @return an instance of SourceControlConfigurationClientImpl. */ public SourceControlConfigurationClientImpl buildClient() { - if (endpoint == null) { - this.endpoint = "https://management.azure.com"; - } - if (environment == null) { - this.environment = AzureEnvironment.AZURE; - } - if (defaultPollInterval == null) { - this.defaultPollInterval = Duration.ofSeconds(30); - } - if (pipeline == null) { - this.pipeline = - new HttpPipelineBuilder() - .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) - .build(); - } - if (serializerAdapter == null) { - this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); - } + 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(); SourceControlConfigurationClientImpl client = new SourceControlConfigurationClientImpl( - pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); + localPipeline, + localSerializerAdapter, + localDefaultPollInterval, + localEnvironment, + subscriptionId, + localEndpoint); return client; } } diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/SourceControlConfigurationClientImpl.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/SourceControlConfigurationClientImpl.java index 92ed100101ea9..42e845560db22 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/SourceControlConfigurationClientImpl.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/SourceControlConfigurationClientImpl.java @@ -15,6 +15,7 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.AsyncPollResponse; import com.azure.core.util.polling.LongRunningOperationStatus; @@ -34,7 +35,6 @@ import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.time.Duration; -import java.util.Map; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -207,7 +207,7 @@ public OperationsClient getOperations() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2022-03-01"; + this.apiVersion = "2022-11-01"; this.extensions = new ExtensionsClientImpl(this); this.operationStatus = new OperationStatusClientImpl(this); this.fluxConfigurations = new FluxConfigurationsClientImpl(this); @@ -232,10 +232,7 @@ public Context getContext() { * @return the merged context. */ public Context mergeContext(Context context) { - for (Map.Entry entry : this.getContext().getValues().entrySet()) { - context = context.addData(entry.getKey(), entry.getValue()); - } - return context; + return CoreUtils.mergeContexts(this.getContext(), context); } /** diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/SourceControlConfigurationsClientImpl.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/SourceControlConfigurationsClientImpl.java index f1f7f2126c835..ae06d31bc443e 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/SourceControlConfigurationsClientImpl.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/SourceControlConfigurationsClientImpl.java @@ -65,7 +65,7 @@ public final class SourceControlConfigurationsClientImpl implements SourceContro */ @Host("{$host}") @ServiceInterface(name = "SourceControlConfigu") - private interface SourceControlConfigurationsService { + public interface SourceControlConfigurationsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}" @@ -324,14 +324,7 @@ private Mono getAsync( String sourceControlConfigurationName) { return getWithResponseAsync( resourceGroupName, clusterRp, clusterResourceName, clusterName, sourceControlConfigurationName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -344,19 +337,22 @@ private Mono getAsync( * provisionedClusters. * @param clusterName The name of the kubernetes cluster. * @param sourceControlConfigurationName Name of the Source Control Configuration. + * @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 details of the Source Control Configuration. + * @return details of the Source Control Configuration along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SourceControlConfigurationInner get( + public Response getWithResponse( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, - String sourceControlConfigurationName) { - return getAsync(resourceGroupName, clusterRp, clusterResourceName, clusterName, sourceControlConfigurationName) + String sourceControlConfigurationName, + Context context) { + return getWithResponseAsync( + resourceGroupName, clusterRp, clusterResourceName, clusterName, sourceControlConfigurationName, context) .block(); } @@ -370,23 +366,26 @@ public SourceControlConfigurationInner get( * provisionedClusters. * @param clusterName The name of the kubernetes cluster. * @param sourceControlConfigurationName Name of the Source Control Configuration. - * @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 details of the Source Control Configuration along with {@link Response}. + * @return details of the Source Control Configuration. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( + public SourceControlConfigurationInner get( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, - String sourceControlConfigurationName, - Context context) { - return getWithResponseAsync( - resourceGroupName, clusterRp, clusterResourceName, clusterName, sourceControlConfigurationName, context) - .block(); + String sourceControlConfigurationName) { + return getWithResponse( + resourceGroupName, + clusterRp, + clusterResourceName, + clusterName, + sourceControlConfigurationName, + Context.NONE) + .getValue(); } /** @@ -590,14 +589,7 @@ private Mono createOrUpdateAsync( clusterName, sourceControlConfigurationName, sourceControlConfiguration) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -611,26 +603,29 @@ private Mono createOrUpdateAsync( * @param clusterName The name of the kubernetes cluster. * @param sourceControlConfigurationName Name of the Source Control Configuration. * @param sourceControlConfiguration Properties necessary to Create KubernetesConfiguration. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the SourceControl Configuration object returned in Get & Put response. + * @return the SourceControl Configuration object returned in Get & Put response along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SourceControlConfigurationInner createOrUpdate( + public Response createOrUpdateWithResponse( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, String sourceControlConfigurationName, - SourceControlConfigurationInner sourceControlConfiguration) { - return createOrUpdateAsync( + SourceControlConfigurationInner sourceControlConfiguration, + Context context) { + return createOrUpdateWithResponseAsync( resourceGroupName, clusterRp, clusterResourceName, clusterName, sourceControlConfigurationName, - sourceControlConfiguration) + sourceControlConfiguration, + context) .block(); } @@ -645,30 +640,28 @@ public SourceControlConfigurationInner createOrUpdate( * @param clusterName The name of the kubernetes cluster. * @param sourceControlConfigurationName Name of the Source Control Configuration. * @param sourceControlConfiguration Properties necessary to Create KubernetesConfiguration. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the SourceControl Configuration object returned in Get & Put response along with {@link Response}. + * @return the SourceControl Configuration object returned in Get & Put response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( + public SourceControlConfigurationInner createOrUpdate( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, String sourceControlConfigurationName, - SourceControlConfigurationInner sourceControlConfiguration, - Context context) { - return createOrUpdateWithResponseAsync( + SourceControlConfigurationInner sourceControlConfiguration) { + return createOrUpdateWithResponse( resourceGroupName, clusterRp, clusterResourceName, clusterName, sourceControlConfigurationName, sourceControlConfiguration, - context) - .block(); + Context.NONE) + .getValue(); } /** @@ -912,7 +905,8 @@ public SyncPoller, Void> beginDelete( String clusterResourceName, String clusterName, String sourceControlConfigurationName) { - return beginDeleteAsync( + return this + .beginDeleteAsync( resourceGroupName, clusterRp, clusterResourceName, clusterName, sourceControlConfigurationName) .getSyncPoller(); } @@ -942,7 +936,8 @@ public SyncPoller, Void> beginDelete( String clusterName, String sourceControlConfigurationName, Context context) { - return beginDeleteAsync( + return this + .beginDeleteAsync( resourceGroupName, clusterRp, clusterResourceName, clusterName, sourceControlConfigurationName, context) .getSyncPoller(); } @@ -1293,7 +1288,8 @@ public PagedIterable list( /** * 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. @@ -1329,7 +1325,8 @@ private Mono> listNextSinglePageA /** * 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. diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/SourceControlConfigurationsImpl.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/SourceControlConfigurationsImpl.java index 712008dddb55f..ddb0f20deb382 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/SourceControlConfigurationsImpl.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/SourceControlConfigurationsImpl.java @@ -28,23 +28,6 @@ public SourceControlConfigurationsImpl( this.serviceManager = serviceManager; } - public SourceControlConfiguration get( - String resourceGroupName, - String clusterRp, - String clusterResourceName, - String clusterName, - String sourceControlConfigurationName) { - SourceControlConfigurationInner inner = - this - .serviceClient() - .get(resourceGroupName, clusterRp, clusterResourceName, clusterName, sourceControlConfigurationName); - if (inner != null) { - return new SourceControlConfigurationImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String clusterRp, @@ -73,23 +56,16 @@ public Response getWithResponse( } } - public SourceControlConfiguration createOrUpdate( + public SourceControlConfiguration get( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, - String sourceControlConfigurationName, - SourceControlConfigurationInner sourceControlConfiguration) { + String sourceControlConfigurationName) { SourceControlConfigurationInner inner = this .serviceClient() - .createOrUpdate( - resourceGroupName, - clusterRp, - clusterResourceName, - clusterName, - sourceControlConfigurationName, - sourceControlConfiguration); + .get(resourceGroupName, clusterRp, clusterResourceName, clusterName, sourceControlConfigurationName); if (inner != null) { return new SourceControlConfigurationImpl(inner, this.manager()); } else { @@ -127,6 +103,30 @@ public Response createOrUpdateWithResponse( } } + public SourceControlConfiguration createOrUpdate( + String resourceGroupName, + String clusterRp, + String clusterResourceName, + String clusterName, + String sourceControlConfigurationName, + SourceControlConfigurationInner sourceControlConfiguration) { + SourceControlConfigurationInner inner = + this + .serviceClient() + .createOrUpdate( + resourceGroupName, + clusterRp, + clusterResourceName, + clusterName, + sourceControlConfigurationName, + sourceControlConfiguration); + if (inner != null) { + return new SourceControlConfigurationImpl(inner, this.manager()); + } else { + return null; + } + } + public void delete( String resourceGroupName, String clusterRp, diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/AksIdentityType.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/AksIdentityType.java index 7d320a479ad90..b0528192437ce 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/AksIdentityType.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/AksIdentityType.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Defines values for AksIdentityType. */ +/** The identity type. */ public enum AksIdentityType { /** Enum value SystemAssigned. */ SYSTEM_ASSIGNED("SystemAssigned"), @@ -30,6 +30,9 @@ public enum AksIdentityType { */ @JsonCreator public static AksIdentityType fromString(String value) { + if (value == null) { + return null; + } AksIdentityType[] items = AksIdentityType.values(); for (AksIdentityType item : items) { if (item.toString().equalsIgnoreCase(value)) { @@ -39,6 +42,7 @@ public static AksIdentityType fromString(String value) { return null; } + /** {@inheritDoc} */ @JsonValue @Override public String toString() { diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/AzureBlobDefinition.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/AzureBlobDefinition.java new file mode 100644 index 0000000000000..37c0112ff1a9b --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/AzureBlobDefinition.java @@ -0,0 +1,273 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kubernetesconfiguration.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Parameters to reconcile to the AzureBlob source kind type. */ +@Fluent +public final class AzureBlobDefinition { + /* + * The URL to sync for the flux configuration Azure Blob storage account. + */ + @JsonProperty(value = "url") + private String url; + + /* + * The Azure Blob container name to sync from the url endpoint for the flux configuration. + */ + @JsonProperty(value = "containerName") + private String containerName; + + /* + * The maximum time to attempt to reconcile the cluster Azure Blob source with the remote. + */ + @JsonProperty(value = "timeoutInSeconds") + private Long timeoutInSeconds; + + /* + * The interval at which to re-reconcile the cluster Azure Blob source with the remote. + */ + @JsonProperty(value = "syncIntervalInSeconds") + private Long syncIntervalInSeconds; + + /* + * Parameters to authenticate using Service Principal. + */ + @JsonProperty(value = "servicePrincipal") + private ServicePrincipalDefinition servicePrincipal; + + /* + * The account key (shared key) to access the storage account + */ + @JsonProperty(value = "accountKey") + private String accountKey; + + /* + * The Shared Access token to access the storage container + */ + @JsonProperty(value = "sasToken") + private String sasToken; + + /* + * Parameters to authenticate using a Managed Identity. + */ + @JsonProperty(value = "managedIdentity") + private ManagedIdentityDefinition managedIdentity; + + /* + * Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or + * user-provided configuration secrets. + */ + @JsonProperty(value = "localAuthRef") + private String localAuthRef; + + /** Creates an instance of AzureBlobDefinition class. */ + public AzureBlobDefinition() { + } + + /** + * Get the url property: The URL to sync for the flux configuration Azure Blob storage account. + * + * @return the url value. + */ + public String url() { + return this.url; + } + + /** + * Set the url property: The URL to sync for the flux configuration Azure Blob storage account. + * + * @param url the url value to set. + * @return the AzureBlobDefinition object itself. + */ + public AzureBlobDefinition withUrl(String url) { + this.url = url; + return this; + } + + /** + * Get the containerName property: The Azure Blob container name to sync from the url endpoint for the flux + * configuration. + * + * @return the containerName value. + */ + public String containerName() { + return this.containerName; + } + + /** + * Set the containerName property: The Azure Blob container name to sync from the url endpoint for the flux + * configuration. + * + * @param containerName the containerName value to set. + * @return the AzureBlobDefinition object itself. + */ + public AzureBlobDefinition withContainerName(String containerName) { + this.containerName = containerName; + return this; + } + + /** + * Get the timeoutInSeconds property: The maximum time to attempt to reconcile the cluster Azure Blob source with + * the remote. + * + * @return the timeoutInSeconds value. + */ + public Long timeoutInSeconds() { + return this.timeoutInSeconds; + } + + /** + * Set the timeoutInSeconds property: The maximum time to attempt to reconcile the cluster Azure Blob source with + * the remote. + * + * @param timeoutInSeconds the timeoutInSeconds value to set. + * @return the AzureBlobDefinition object itself. + */ + public AzureBlobDefinition withTimeoutInSeconds(Long timeoutInSeconds) { + this.timeoutInSeconds = timeoutInSeconds; + return this; + } + + /** + * Get the syncIntervalInSeconds property: The interval at which to re-reconcile the cluster Azure Blob source with + * the remote. + * + * @return the syncIntervalInSeconds value. + */ + public Long syncIntervalInSeconds() { + return this.syncIntervalInSeconds; + } + + /** + * Set the syncIntervalInSeconds property: The interval at which to re-reconcile the cluster Azure Blob source with + * the remote. + * + * @param syncIntervalInSeconds the syncIntervalInSeconds value to set. + * @return the AzureBlobDefinition object itself. + */ + public AzureBlobDefinition withSyncIntervalInSeconds(Long syncIntervalInSeconds) { + this.syncIntervalInSeconds = syncIntervalInSeconds; + return this; + } + + /** + * Get the servicePrincipal property: Parameters to authenticate using Service Principal. + * + * @return the servicePrincipal value. + */ + public ServicePrincipalDefinition servicePrincipal() { + return this.servicePrincipal; + } + + /** + * Set the servicePrincipal property: Parameters to authenticate using Service Principal. + * + * @param servicePrincipal the servicePrincipal value to set. + * @return the AzureBlobDefinition object itself. + */ + public AzureBlobDefinition withServicePrincipal(ServicePrincipalDefinition servicePrincipal) { + this.servicePrincipal = servicePrincipal; + return this; + } + + /** + * Get the accountKey property: The account key (shared key) to access the storage account. + * + * @return the accountKey value. + */ + public String accountKey() { + return this.accountKey; + } + + /** + * Set the accountKey property: The account key (shared key) to access the storage account. + * + * @param accountKey the accountKey value to set. + * @return the AzureBlobDefinition object itself. + */ + public AzureBlobDefinition withAccountKey(String accountKey) { + this.accountKey = accountKey; + return this; + } + + /** + * Get the sasToken property: The Shared Access token to access the storage container. + * + * @return the sasToken value. + */ + public String sasToken() { + return this.sasToken; + } + + /** + * Set the sasToken property: The Shared Access token to access the storage container. + * + * @param sasToken the sasToken value to set. + * @return the AzureBlobDefinition object itself. + */ + public AzureBlobDefinition withSasToken(String sasToken) { + this.sasToken = sasToken; + return this; + } + + /** + * Get the managedIdentity property: Parameters to authenticate using a Managed Identity. + * + * @return the managedIdentity value. + */ + public ManagedIdentityDefinition managedIdentity() { + return this.managedIdentity; + } + + /** + * Set the managedIdentity property: Parameters to authenticate using a Managed Identity. + * + * @param managedIdentity the managedIdentity value to set. + * @return the AzureBlobDefinition object itself. + */ + public AzureBlobDefinition withManagedIdentity(ManagedIdentityDefinition managedIdentity) { + this.managedIdentity = managedIdentity; + return this; + } + + /** + * Get the localAuthRef property: Name of a local secret on the Kubernetes cluster to use as the authentication + * secret rather than the managed or user-provided configuration secrets. + * + * @return the localAuthRef value. + */ + public String localAuthRef() { + return this.localAuthRef; + } + + /** + * Set the localAuthRef property: Name of a local secret on the Kubernetes cluster to use as the authentication + * secret rather than the managed or user-provided configuration secrets. + * + * @param localAuthRef the localAuthRef value to set. + * @return the AzureBlobDefinition object itself. + */ + public AzureBlobDefinition withLocalAuthRef(String localAuthRef) { + this.localAuthRef = localAuthRef; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (servicePrincipal() != null) { + servicePrincipal().validate(); + } + if (managedIdentity() != null) { + managedIdentity().validate(); + } + } +} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/AzureBlobPatchDefinition.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/AzureBlobPatchDefinition.java new file mode 100644 index 0000000000000..bbf9e2173b522 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/AzureBlobPatchDefinition.java @@ -0,0 +1,273 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kubernetesconfiguration.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Parameters to reconcile to the AzureBlob source kind type. */ +@Fluent +public final class AzureBlobPatchDefinition { + /* + * The URL to sync for the flux configuration Azure Blob storage account. + */ + @JsonProperty(value = "url") + private String url; + + /* + * The Azure Blob container name to sync from the url endpoint for the flux configuration. + */ + @JsonProperty(value = "containerName") + private String containerName; + + /* + * The maximum time to attempt to reconcile the cluster Azure Blob source with the remote. + */ + @JsonProperty(value = "timeoutInSeconds") + private Long timeoutInSeconds; + + /* + * The interval at which to re-reconcile the cluster Azure Blob source with the remote. + */ + @JsonProperty(value = "syncIntervalInSeconds") + private Long syncIntervalInSeconds; + + /* + * Parameters to authenticate using Service Principal. + */ + @JsonProperty(value = "servicePrincipal") + private ServicePrincipalPatchDefinition servicePrincipal; + + /* + * The account key (shared key) to access the storage account + */ + @JsonProperty(value = "accountKey") + private String accountKey; + + /* + * The Shared Access token to access the storage container + */ + @JsonProperty(value = "sasToken") + private String sasToken; + + /* + * Parameters to authenticate using a Managed Identity. + */ + @JsonProperty(value = "managedIdentity") + private ManagedIdentityPatchDefinition managedIdentity; + + /* + * Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or + * user-provided configuration secrets. + */ + @JsonProperty(value = "localAuthRef") + private String localAuthRef; + + /** Creates an instance of AzureBlobPatchDefinition class. */ + public AzureBlobPatchDefinition() { + } + + /** + * Get the url property: The URL to sync for the flux configuration Azure Blob storage account. + * + * @return the url value. + */ + public String url() { + return this.url; + } + + /** + * Set the url property: The URL to sync for the flux configuration Azure Blob storage account. + * + * @param url the url value to set. + * @return the AzureBlobPatchDefinition object itself. + */ + public AzureBlobPatchDefinition withUrl(String url) { + this.url = url; + return this; + } + + /** + * Get the containerName property: The Azure Blob container name to sync from the url endpoint for the flux + * configuration. + * + * @return the containerName value. + */ + public String containerName() { + return this.containerName; + } + + /** + * Set the containerName property: The Azure Blob container name to sync from the url endpoint for the flux + * configuration. + * + * @param containerName the containerName value to set. + * @return the AzureBlobPatchDefinition object itself. + */ + public AzureBlobPatchDefinition withContainerName(String containerName) { + this.containerName = containerName; + return this; + } + + /** + * Get the timeoutInSeconds property: The maximum time to attempt to reconcile the cluster Azure Blob source with + * the remote. + * + * @return the timeoutInSeconds value. + */ + public Long timeoutInSeconds() { + return this.timeoutInSeconds; + } + + /** + * Set the timeoutInSeconds property: The maximum time to attempt to reconcile the cluster Azure Blob source with + * the remote. + * + * @param timeoutInSeconds the timeoutInSeconds value to set. + * @return the AzureBlobPatchDefinition object itself. + */ + public AzureBlobPatchDefinition withTimeoutInSeconds(Long timeoutInSeconds) { + this.timeoutInSeconds = timeoutInSeconds; + return this; + } + + /** + * Get the syncIntervalInSeconds property: The interval at which to re-reconcile the cluster Azure Blob source with + * the remote. + * + * @return the syncIntervalInSeconds value. + */ + public Long syncIntervalInSeconds() { + return this.syncIntervalInSeconds; + } + + /** + * Set the syncIntervalInSeconds property: The interval at which to re-reconcile the cluster Azure Blob source with + * the remote. + * + * @param syncIntervalInSeconds the syncIntervalInSeconds value to set. + * @return the AzureBlobPatchDefinition object itself. + */ + public AzureBlobPatchDefinition withSyncIntervalInSeconds(Long syncIntervalInSeconds) { + this.syncIntervalInSeconds = syncIntervalInSeconds; + return this; + } + + /** + * Get the servicePrincipal property: Parameters to authenticate using Service Principal. + * + * @return the servicePrincipal value. + */ + public ServicePrincipalPatchDefinition servicePrincipal() { + return this.servicePrincipal; + } + + /** + * Set the servicePrincipal property: Parameters to authenticate using Service Principal. + * + * @param servicePrincipal the servicePrincipal value to set. + * @return the AzureBlobPatchDefinition object itself. + */ + public AzureBlobPatchDefinition withServicePrincipal(ServicePrincipalPatchDefinition servicePrincipal) { + this.servicePrincipal = servicePrincipal; + return this; + } + + /** + * Get the accountKey property: The account key (shared key) to access the storage account. + * + * @return the accountKey value. + */ + public String accountKey() { + return this.accountKey; + } + + /** + * Set the accountKey property: The account key (shared key) to access the storage account. + * + * @param accountKey the accountKey value to set. + * @return the AzureBlobPatchDefinition object itself. + */ + public AzureBlobPatchDefinition withAccountKey(String accountKey) { + this.accountKey = accountKey; + return this; + } + + /** + * Get the sasToken property: The Shared Access token to access the storage container. + * + * @return the sasToken value. + */ + public String sasToken() { + return this.sasToken; + } + + /** + * Set the sasToken property: The Shared Access token to access the storage container. + * + * @param sasToken the sasToken value to set. + * @return the AzureBlobPatchDefinition object itself. + */ + public AzureBlobPatchDefinition withSasToken(String sasToken) { + this.sasToken = sasToken; + return this; + } + + /** + * Get the managedIdentity property: Parameters to authenticate using a Managed Identity. + * + * @return the managedIdentity value. + */ + public ManagedIdentityPatchDefinition managedIdentity() { + return this.managedIdentity; + } + + /** + * Set the managedIdentity property: Parameters to authenticate using a Managed Identity. + * + * @param managedIdentity the managedIdentity value to set. + * @return the AzureBlobPatchDefinition object itself. + */ + public AzureBlobPatchDefinition withManagedIdentity(ManagedIdentityPatchDefinition managedIdentity) { + this.managedIdentity = managedIdentity; + return this; + } + + /** + * Get the localAuthRef property: Name of a local secret on the Kubernetes cluster to use as the authentication + * secret rather than the managed or user-provided configuration secrets. + * + * @return the localAuthRef value. + */ + public String localAuthRef() { + return this.localAuthRef; + } + + /** + * Set the localAuthRef property: Name of a local secret on the Kubernetes cluster to use as the authentication + * secret rather than the managed or user-provided configuration secrets. + * + * @param localAuthRef the localAuthRef value to set. + * @return the AzureBlobPatchDefinition object itself. + */ + public AzureBlobPatchDefinition withLocalAuthRef(String localAuthRef) { + this.localAuthRef = localAuthRef; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (servicePrincipal() != null) { + servicePrincipal().validate(); + } + if (managedIdentity() != null) { + managedIdentity().validate(); + } + } +} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/BucketDefinition.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/BucketDefinition.java index a3400b5f33b74..90a3921b5ba78 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/BucketDefinition.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/BucketDefinition.java @@ -7,7 +7,7 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Parameters to reconcile to the GitRepository source kind type. */ +/** Parameters to reconcile to the Bucket source kind type. */ @Fluent public final class BucketDefinition { /* @@ -17,29 +17,25 @@ public final class BucketDefinition { private String url; /* - * The bucket name to sync from the url endpoint for the flux - * configuration. + * The bucket name to sync from the url endpoint for the flux configuration. */ @JsonProperty(value = "bucketName") private String bucketName; /* - * Specify whether to use insecure communication when puling data from the - * S3 bucket. + * Specify whether to use insecure communication when puling data from the S3 bucket. */ @JsonProperty(value = "insecure") private Boolean insecure; /* - * The maximum time to attempt to reconcile the cluster git repository - * source with the remote. + * The maximum time to attempt to reconcile the cluster bucket source with the remote. */ @JsonProperty(value = "timeoutInSeconds") private Long timeoutInSeconds; /* - * The interval at which to re-reconcile the cluster git repository source - * with the remote. + * The interval at which to re-reconcile the cluster bucket source with the remote. */ @JsonProperty(value = "syncIntervalInSeconds") private Long syncIntervalInSeconds; @@ -51,13 +47,16 @@ public final class BucketDefinition { private String accessKey; /* - * Name of a local secret on the Kubernetes cluster to use as the - * authentication secret rather than the managed or user-provided - * configuration secrets. + * Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or + * user-provided configuration secrets. */ @JsonProperty(value = "localAuthRef") private String localAuthRef; + /** Creates an instance of BucketDefinition class. */ + public BucketDefinition() { + } + /** * Get the url property: The URL to sync for the flux configuration S3 bucket. * @@ -119,8 +118,8 @@ public BucketDefinition withInsecure(Boolean insecure) { } /** - * Get the timeoutInSeconds property: The maximum time to attempt to reconcile the cluster git repository source - * with the remote. + * Get the timeoutInSeconds property: The maximum time to attempt to reconcile the cluster bucket source with the + * remote. * * @return the timeoutInSeconds value. */ @@ -129,8 +128,8 @@ public Long timeoutInSeconds() { } /** - * Set the timeoutInSeconds property: The maximum time to attempt to reconcile the cluster git repository source - * with the remote. + * Set the timeoutInSeconds property: The maximum time to attempt to reconcile the cluster bucket source with the + * remote. * * @param timeoutInSeconds the timeoutInSeconds value to set. * @return the BucketDefinition object itself. @@ -141,8 +140,8 @@ public BucketDefinition withTimeoutInSeconds(Long timeoutInSeconds) { } /** - * Get the syncIntervalInSeconds property: The interval at which to re-reconcile the cluster git repository source - * with the remote. + * Get the syncIntervalInSeconds property: The interval at which to re-reconcile the cluster bucket source with the + * remote. * * @return the syncIntervalInSeconds value. */ @@ -151,8 +150,8 @@ public Long syncIntervalInSeconds() { } /** - * Set the syncIntervalInSeconds property: The interval at which to re-reconcile the cluster git repository source - * with the remote. + * Set the syncIntervalInSeconds property: The interval at which to re-reconcile the cluster bucket source with the + * remote. * * @param syncIntervalInSeconds the syncIntervalInSeconds value to set. * @return the BucketDefinition object itself. diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/BucketPatchDefinition.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/BucketPatchDefinition.java index e2579bf5c22c6..f5f46df520e99 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/BucketPatchDefinition.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/BucketPatchDefinition.java @@ -7,7 +7,7 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Parameters to reconcile to the GitRepository source kind type. */ +/** Parameters to reconcile to the Bucket source kind type. */ @Fluent public final class BucketPatchDefinition { /* @@ -17,29 +17,25 @@ public final class BucketPatchDefinition { private String url; /* - * The bucket name to sync from the url endpoint for the flux - * configuration. + * The bucket name to sync from the url endpoint for the flux configuration. */ @JsonProperty(value = "bucketName") private String bucketName; /* - * Specify whether to use insecure communication when puling data from the - * S3 bucket. + * Specify whether to use insecure communication when puling data from the S3 bucket. */ @JsonProperty(value = "insecure") private Boolean insecure; /* - * The maximum time to attempt to reconcile the cluster git repository - * source with the remote. + * The maximum time to attempt to reconcile the cluster bucket source with the remote. */ @JsonProperty(value = "timeoutInSeconds") private Long timeoutInSeconds; /* - * The interval at which to re-reconcile the cluster git repository source - * with the remote. + * The interval at which to re-reconcile the cluster bucket source with the remote. */ @JsonProperty(value = "syncIntervalInSeconds") private Long syncIntervalInSeconds; @@ -51,13 +47,16 @@ public final class BucketPatchDefinition { private String accessKey; /* - * Name of a local secret on the Kubernetes cluster to use as the - * authentication secret rather than the managed or user-provided - * configuration secrets. + * Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or + * user-provided configuration secrets. */ @JsonProperty(value = "localAuthRef") private String localAuthRef; + /** Creates an instance of BucketPatchDefinition class. */ + public BucketPatchDefinition() { + } + /** * Get the url property: The URL to sync for the flux configuration S3 bucket. * @@ -119,8 +118,8 @@ public BucketPatchDefinition withInsecure(Boolean insecure) { } /** - * Get the timeoutInSeconds property: The maximum time to attempt to reconcile the cluster git repository source - * with the remote. + * Get the timeoutInSeconds property: The maximum time to attempt to reconcile the cluster bucket source with the + * remote. * * @return the timeoutInSeconds value. */ @@ -129,8 +128,8 @@ public Long timeoutInSeconds() { } /** - * Set the timeoutInSeconds property: The maximum time to attempt to reconcile the cluster git repository source - * with the remote. + * Set the timeoutInSeconds property: The maximum time to attempt to reconcile the cluster bucket source with the + * remote. * * @param timeoutInSeconds the timeoutInSeconds value to set. * @return the BucketPatchDefinition object itself. @@ -141,8 +140,8 @@ public BucketPatchDefinition withTimeoutInSeconds(Long timeoutInSeconds) { } /** - * Get the syncIntervalInSeconds property: The interval at which to re-reconcile the cluster git repository source - * with the remote. + * Get the syncIntervalInSeconds property: The interval at which to re-reconcile the cluster bucket source with the + * remote. * * @return the syncIntervalInSeconds value. */ @@ -151,8 +150,8 @@ public Long syncIntervalInSeconds() { } /** - * Set the syncIntervalInSeconds property: The interval at which to re-reconcile the cluster git repository source - * with the remote. + * Set the syncIntervalInSeconds property: The interval at which to re-reconcile the cluster bucket source with the + * remote. * * @param syncIntervalInSeconds the syncIntervalInSeconds value to set. * @return the BucketPatchDefinition object itself. diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ComplianceStateType.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ComplianceStateType.java index fe79e77156cd3..39e54892432c1 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ComplianceStateType.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ComplianceStateType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ComplianceStateType. */ +/** The compliance state of the configuration. */ public final class ComplianceStateType extends ExpandableStringEnum { /** Static value Pending for ComplianceStateType. */ public static final ComplianceStateType PENDING = fromString("Pending"); @@ -25,6 +25,15 @@ public final class ComplianceStateType extends ExpandableStringEnum values() { return values(ComplianceStateType.class); } diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ComplianceStatus.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ComplianceStatus.java index cca57872ac614..c2a614243515a 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ComplianceStatus.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ComplianceStatus.java @@ -35,6 +35,10 @@ public final class ComplianceStatus { @JsonProperty(value = "messageLevel") private MessageLevelType messageLevel; + /** Creates an instance of ComplianceStatus class. */ + public ComplianceStatus() { + } + /** * Get the complianceState property: The compliance state of the configuration. * diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/Extension.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/Extension.java index 790931cb77e06..6e977e2cca457 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/Extension.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/Extension.java @@ -48,6 +48,13 @@ public interface Extension { */ SystemData systemData(); + /** + * Gets the plan property: The plan information. + * + * @return the plan value. + */ + Plan plan(); + /** * Gets the extensionType property: Type of the Extension, of which this resource is an instance of. It must be one * of the Extension Types registered with Microsoft.KubernetesConfiguration by the Extension publisher. @@ -104,11 +111,11 @@ public interface Extension { Map configurationProtectedSettings(); /** - * Gets the installedVersion property: Installed version of the extension. + * Gets the currentVersion property: Currently installed version of the extension. * - * @return the installedVersion value. + * @return the currentVersion value. */ - String installedVersion(); + String currentVersion(); /** * Gets the provisioningState property: Status of installation of this extension. @@ -152,6 +159,13 @@ public interface Extension { */ ExtensionPropertiesAksAssignedIdentity aksAssignedIdentity(); + /** + * Gets the isSystemExtension property: Flag to note if this extension is a system extension. + * + * @return the isSystemExtension value. + */ + Boolean isSystemExtension(); + /** * Gets the inner com.azure.resourcemanager.kubernetesconfiguration.fluent.models.ExtensionInner object. * diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionPropertiesAksAssignedIdentity.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionPropertiesAksAssignedIdentity.java index 8eb7cb7fa08bb..6931655c26e49 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionPropertiesAksAssignedIdentity.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionPropertiesAksAssignedIdentity.java @@ -28,6 +28,10 @@ public class ExtensionPropertiesAksAssignedIdentity { @JsonProperty(value = "type") private AksIdentityType type; + /** Creates an instance of ExtensionPropertiesAksAssignedIdentity class. */ + public ExtensionPropertiesAksAssignedIdentity() { + } + /** * Get the principalId property: The principal ID of resource identity. * diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionStatus.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionStatus.java index 5e99f8c0de997..885143ae4b120 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionStatus.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionStatus.java @@ -40,6 +40,10 @@ public final class ExtensionStatus { @JsonProperty(value = "time") private String time; + /** Creates an instance of ExtensionStatus class. */ + public ExtensionStatus() { + } + /** * Get the code property: Status code provided by the Extension. * diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/Extensions.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/Extensions.java index 47ce43d2d71b0..93819ca1ad4bb 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/Extensions.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/Extensions.java @@ -61,28 +61,6 @@ Extension create( ExtensionInner extension, Context context); - /** - * Gets Kubernetes Cluster Extension. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, - * provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param extensionName Name of the Extension. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return kubernetes Cluster Extension. - */ - Extension get( - String resourceGroupName, - String clusterRp, - String clusterResourceName, - String clusterName, - String extensionName); - /** * Gets Kubernetes Cluster Extension. * @@ -108,7 +86,7 @@ Response getWithResponse( Context context); /** - * Delete a Kubernetes Cluster Extension. This will cause the Agent to Uninstall the extension from the cluster. + * Gets Kubernetes Cluster Extension. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, @@ -117,18 +95,17 @@ Response getWithResponse( * provisionedClusters. * @param clusterName The name of the kubernetes cluster. * @param extensionName Name of the Extension. - * @param forceDelete Delete the extension resource in Azure - not the normal asynchronous delete. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return kubernetes Cluster Extension. */ - void delete( + Extension get( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, - String extensionName, - Boolean forceDelete); + String extensionName); /** * Delete a Kubernetes Cluster Extension. This will cause the Agent to Uninstall the extension from the cluster. diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionsList.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionsList.java index 410881afdcbe3..6faa2fdabc167 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionsList.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionsList.java @@ -27,6 +27,10 @@ public final class ExtensionsList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of ExtensionsList class. */ + public ExtensionsList() { + } + /** * Get the value property: List of Extensions within a Kubernetes cluster. * diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/FluxComplianceState.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/FluxComplianceState.java index 5f708cfccf8b0..2acb16fadccff 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/FluxComplianceState.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/FluxComplianceState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for FluxComplianceState. */ +/** Compliance state of the cluster object. */ public final class FluxComplianceState extends ExpandableStringEnum { /** Static value Compliant for FluxComplianceState. */ public static final FluxComplianceState COMPLIANT = fromString("Compliant"); @@ -25,6 +25,15 @@ public final class FluxComplianceState extends ExpandableStringEnum values() { return values(FluxComplianceState.class); } diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/FluxConfigOperationStatus.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/FluxConfigOperationStatus.java index c6797a2b4b4a4..b8305dfd96971 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/FluxConfigOperationStatus.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/FluxConfigOperationStatus.java @@ -20,18 +20,20 @@ public interface FluxConfigOperationStatus { * @param clusterName The name of the kubernetes cluster. * @param fluxConfigurationName Name of the Flux Configuration. * @param operationId operation Id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return async Operation status. + * @return async Operation status along with {@link Response}. */ - OperationStatusResult get( + Response getWithResponse( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, String fluxConfigurationName, - String operationId); + String operationId, + Context context); /** * Get Async Operation status. @@ -44,18 +46,16 @@ OperationStatusResult get( * @param clusterName The name of the kubernetes cluster. * @param fluxConfigurationName Name of the Flux Configuration. * @param operationId operation Id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return async Operation status along with {@link Response}. + * @return async Operation status. */ - Response getWithResponse( + OperationStatusResult get( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, String fluxConfigurationName, - String operationId, - Context context); + String operationId); } diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/FluxConfiguration.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/FluxConfiguration.java index ee5831891d369..d631b4014e2ad 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/FluxConfiguration.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/FluxConfiguration.java @@ -85,6 +85,13 @@ public interface FluxConfiguration { */ BucketDefinition bucket(); + /** + * Gets the azureBlob property: Parameters to reconcile to the AzureBlob source kind type. + * + * @return the azureBlob value. + */ + AzureBlobDefinition azureBlob(); + /** * Gets the kustomizations property: Array of kustomizations used to reconcile the artifact pulled by the source * type on the cluster. diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/FluxConfigurationPatch.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/FluxConfigurationPatch.java index 43f845b0faf20..5a192fc930f93 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/FluxConfigurationPatch.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/FluxConfigurationPatch.java @@ -18,6 +18,10 @@ public final class FluxConfigurationPatch { @JsonProperty(value = "properties") private FluxConfigurationPatchProperties innerProperties; + /** Creates an instance of FluxConfigurationPatch class. */ + public FluxConfigurationPatch() { + } + /** * Get the innerProperties property: Updatable properties of an Flux Configuration Patch Request. * @@ -121,6 +125,29 @@ public FluxConfigurationPatch withBucket(BucketPatchDefinition bucket) { return this; } + /** + * Get the azureBlob property: Parameters to reconcile to the AzureBlob source kind type. + * + * @return the azureBlob value. + */ + public AzureBlobPatchDefinition azureBlob() { + return this.innerProperties() == null ? null : this.innerProperties().azureBlob(); + } + + /** + * Set the azureBlob property: Parameters to reconcile to the AzureBlob source kind type. + * + * @param azureBlob the azureBlob value to set. + * @return the FluxConfigurationPatch object itself. + */ + public FluxConfigurationPatch withAzureBlob(AzureBlobPatchDefinition azureBlob) { + if (this.innerProperties() == null) { + this.innerProperties = new FluxConfigurationPatchProperties(); + } + this.innerProperties().withAzureBlob(azureBlob); + return this; + } + /** * Get the kustomizations property: Array of kustomizations used to reconcile the artifact pulled by the source type * on the cluster. diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/FluxConfigurations.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/FluxConfigurations.java index d5c04e26862f1..7d54476622d0e 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/FluxConfigurations.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/FluxConfigurations.java @@ -21,17 +21,19 @@ public interface FluxConfigurations { * provisionedClusters. * @param clusterName The name of the kubernetes cluster. * @param fluxConfigurationName Name of the Flux Configuration. + * @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 details of the Flux Configuration. + * @return details of the Flux Configuration along with {@link Response}. */ - FluxConfiguration get( + Response getWithResponse( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, - String fluxConfigurationName); + String fluxConfigurationName, + Context context); /** * Gets details of the Flux Configuration. @@ -43,19 +45,17 @@ FluxConfiguration get( * provisionedClusters. * @param clusterName The name of the kubernetes cluster. * @param fluxConfigurationName Name of the Flux Configuration. - * @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 details of the Flux Configuration along with {@link Response}. + * @return details of the Flux Configuration. */ - Response getWithResponse( + FluxConfiguration get( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, - String fluxConfigurationName, - Context context); + String fluxConfigurationName); /** * Create a new Kubernetes Flux Configuration. @@ -157,30 +157,6 @@ FluxConfiguration update( FluxConfigurationPatch fluxConfigurationPatch, Context context); - /** - * This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source - * repo. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param clusterRp The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, - * Microsoft.HybridContainerService. - * @param clusterResourceName The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, - * provisionedClusters. - * @param clusterName The name of the kubernetes cluster. - * @param fluxConfigurationName Name of the Flux Configuration. - * @param forceDelete Delete the extension resource in Azure - not the normal asynchronous delete. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete( - String resourceGroupName, - String clusterRp, - String clusterResourceName, - String clusterName, - String fluxConfigurationName, - Boolean forceDelete); - /** * This will delete the YAML file used to set up the Flux Configuration, thus stopping future sync from the source * repo. diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/FluxConfigurationsList.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/FluxConfigurationsList.java index dd5469326112e..7406b619e0349 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/FluxConfigurationsList.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/FluxConfigurationsList.java @@ -27,6 +27,10 @@ public final class FluxConfigurationsList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of FluxConfigurationsList class. */ + public FluxConfigurationsList() { + } + /** * Get the value property: List of Flux Configurations within a Kubernetes cluster. * diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/GitRepositoryDefinition.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/GitRepositoryDefinition.java index d781fb1f6fc85..7795ae2777e42 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/GitRepositoryDefinition.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/GitRepositoryDefinition.java @@ -17,15 +17,13 @@ public final class GitRepositoryDefinition { private String url; /* - * The maximum time to attempt to reconcile the cluster git repository - * source with the remote. + * The maximum time to attempt to reconcile the cluster git repository source with the remote. */ @JsonProperty(value = "timeoutInSeconds") private Long timeoutInSeconds; /* - * The interval at which to re-reconcile the cluster git repository source - * with the remote. + * The interval at which to re-reconcile the cluster git repository source with the remote. */ @JsonProperty(value = "syncIntervalInSeconds") private Long syncIntervalInSeconds; @@ -37,34 +35,34 @@ public final class GitRepositoryDefinition { private RepositoryRefDefinition repositoryRef; /* - * Base64-encoded known_hosts value containing public SSH keys required to - * access private git repositories over SSH + * Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH */ @JsonProperty(value = "sshKnownHosts") private String sshKnownHosts; /* - * Plaintext HTTPS username used to access private git repositories over - * HTTPS + * Plaintext HTTPS username used to access private git repositories over HTTPS */ @JsonProperty(value = "httpsUser") private String httpsUser; /* - * Base64-encoded HTTPS certificate authority contents used to access git - * private git repositories over HTTPS + * Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS */ @JsonProperty(value = "httpsCACert") private String httpsCACert; /* - * Name of a local secret on the Kubernetes cluster to use as the - * authentication secret rather than the managed or user-provided - * configuration secrets. + * Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or + * user-provided configuration secrets. */ @JsonProperty(value = "localAuthRef") private String localAuthRef; + /** Creates an instance of GitRepositoryDefinition class. */ + public GitRepositoryDefinition() { + } + /** * Get the url property: The URL to sync for the flux configuration git repository. * diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/GitRepositoryPatchDefinition.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/GitRepositoryPatchDefinition.java index bd234009019fb..e63a8652f7597 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/GitRepositoryPatchDefinition.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/GitRepositoryPatchDefinition.java @@ -17,15 +17,13 @@ public final class GitRepositoryPatchDefinition { private String url; /* - * The maximum time to attempt to reconcile the cluster git repository - * source with the remote. + * The maximum time to attempt to reconcile the cluster git repository source with the remote. */ @JsonProperty(value = "timeoutInSeconds") private Long timeoutInSeconds; /* - * The interval at which to re-reconcile the cluster git repository source - * with the remote. + * The interval at which to re-reconcile the cluster git repository source with the remote. */ @JsonProperty(value = "syncIntervalInSeconds") private Long syncIntervalInSeconds; @@ -37,34 +35,34 @@ public final class GitRepositoryPatchDefinition { private RepositoryRefDefinition repositoryRef; /* - * Base64-encoded known_hosts value containing public SSH keys required to - * access private git repositories over SSH + * Base64-encoded known_hosts value containing public SSH keys required to access private git repositories over SSH */ @JsonProperty(value = "sshKnownHosts") private String sshKnownHosts; /* - * Plaintext HTTPS username used to access private git repositories over - * HTTPS + * Plaintext HTTPS username used to access private git repositories over HTTPS */ @JsonProperty(value = "httpsUser") private String httpsUser; /* - * Base64-encoded HTTPS certificate authority contents used to access git - * private git repositories over HTTPS + * Base64-encoded HTTPS certificate authority contents used to access git private git repositories over HTTPS */ @JsonProperty(value = "httpsCACert") private String httpsCACert; /* - * Name of a local secret on the Kubernetes cluster to use as the - * authentication secret rather than the managed or user-provided - * configuration secrets. + * Name of a local secret on the Kubernetes cluster to use as the authentication secret rather than the managed or + * user-provided configuration secrets. */ @JsonProperty(value = "localAuthRef") private String localAuthRef; + /** Creates an instance of GitRepositoryPatchDefinition class. */ + public GitRepositoryPatchDefinition() { + } + /** * Get the url property: The URL to sync for the flux configuration git repository. * diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/HelmOperatorProperties.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/HelmOperatorProperties.java index 2c2aecc6a0157..14a1d45404554 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/HelmOperatorProperties.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/HelmOperatorProperties.java @@ -22,6 +22,10 @@ public final class HelmOperatorProperties { @JsonProperty(value = "chartValues") private String chartValues; + /** Creates an instance of HelmOperatorProperties class. */ + public HelmOperatorProperties() { + } + /** * Get the chartVersion property: Version of the operator Helm chart. * diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/HelmReleasePropertiesDefinition.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/HelmReleasePropertiesDefinition.java index cd67a05e13238..fdeda87e17910 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/HelmReleasePropertiesDefinition.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/HelmReleasePropertiesDefinition.java @@ -17,8 +17,7 @@ public final class HelmReleasePropertiesDefinition { private Long lastRevisionApplied; /* - * The reference to the HelmChart object used as the source to this - * HelmRelease + * The reference to the HelmChart object used as the source to this HelmRelease */ @JsonProperty(value = "helmChartRef") private ObjectReferenceDefinition helmChartRef; @@ -41,6 +40,10 @@ public final class HelmReleasePropertiesDefinition { @JsonProperty(value = "upgradeFailureCount") private Long upgradeFailureCount; + /** Creates an instance of HelmReleasePropertiesDefinition class. */ + public HelmReleasePropertiesDefinition() { + } + /** * Get the lastRevisionApplied property: The revision number of the last released object change. * diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/Identity.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/Identity.java index cc736817a94b1..914f4a988e641 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/Identity.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/Identity.java @@ -28,6 +28,10 @@ public class Identity { @JsonProperty(value = "type") private ResourceIdentityType type; + /** Creates an instance of Identity class. */ + public Identity() { + } + /** * Get the principalId property: The principal ID of resource identity. * diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/KustomizationDefinition.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/KustomizationDefinition.java index d1d19228c55e3..3d5d6c9d7a119 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/KustomizationDefinition.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/KustomizationDefinition.java @@ -12,8 +12,7 @@ @Fluent public final class KustomizationDefinition { /* - * Name of the Kustomization, matching the key in the Kustomizations object - * map. + * Name of the Kustomization, matching the key in the Kustomizations object map. */ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) private String name; @@ -25,16 +24,14 @@ public final class KustomizationDefinition { private String path; /* - * Specifies other Kustomizations that this Kustomization depends on. This - * Kustomization will not reconcile until all dependencies have completed - * their reconciliation. + * Specifies other Kustomizations that this Kustomization depends on. This Kustomization will not reconcile until + * all dependencies have completed their reconciliation. */ @JsonProperty(value = "dependsOn") private List dependsOn; /* - * The maximum time to attempt to reconcile the Kustomization on the - * cluster. + * The maximum time to attempt to reconcile the Kustomization on the cluster. */ @JsonProperty(value = "timeoutInSeconds") private Long timeoutInSeconds; @@ -46,26 +43,29 @@ public final class KustomizationDefinition { private Long syncIntervalInSeconds; /* - * The interval at which to re-reconcile the Kustomization on the cluster - * in the event of failure on reconciliation. + * The interval at which to re-reconcile the Kustomization on the cluster in the event of failure on + * reconciliation. */ @JsonProperty(value = "retryIntervalInSeconds") private Long retryIntervalInSeconds; /* - * Enable/disable garbage collections of Kubernetes objects created by this - * Kustomization. + * Enable/disable garbage collections of Kubernetes objects created by this Kustomization. */ @JsonProperty(value = "prune") private Boolean prune; /* - * Enable/disable re-creating Kubernetes resources on the cluster when - * patching fails due to an immutable field change. + * Enable/disable re-creating Kubernetes resources on the cluster when patching fails due to an immutable field + * change. */ @JsonProperty(value = "force") private Boolean force; + /** Creates an instance of KustomizationDefinition class. */ + public KustomizationDefinition() { + } + /** * Get the name property: Name of the Kustomization, matching the key in the Kustomizations object map. * diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/KustomizationPatchDefinition.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/KustomizationPatchDefinition.java index 7f0094062876b..f0542691de966 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/KustomizationPatchDefinition.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/KustomizationPatchDefinition.java @@ -18,16 +18,14 @@ public final class KustomizationPatchDefinition { private String path; /* - * Specifies other Kustomizations that this Kustomization depends on. This - * Kustomization will not reconcile until all dependencies have completed - * their reconciliation. + * Specifies other Kustomizations that this Kustomization depends on. This Kustomization will not reconcile until + * all dependencies have completed their reconciliation. */ @JsonProperty(value = "dependsOn") private List dependsOn; /* - * The maximum time to attempt to reconcile the Kustomization on the - * cluster. + * The maximum time to attempt to reconcile the Kustomization on the cluster. */ @JsonProperty(value = "timeoutInSeconds") private Long timeoutInSeconds; @@ -39,26 +37,29 @@ public final class KustomizationPatchDefinition { private Long syncIntervalInSeconds; /* - * The interval at which to re-reconcile the Kustomization on the cluster - * in the event of failure on reconciliation. + * The interval at which to re-reconcile the Kustomization on the cluster in the event of failure on + * reconciliation. */ @JsonProperty(value = "retryIntervalInSeconds") private Long retryIntervalInSeconds; /* - * Enable/disable garbage collections of Kubernetes objects created by this - * Kustomization. + * Enable/disable garbage collections of Kubernetes objects created by this Kustomization. */ @JsonProperty(value = "prune") private Boolean prune; /* - * Enable/disable re-creating Kubernetes resources on the cluster when - * patching fails due to an immutable field change. + * Enable/disable re-creating Kubernetes resources on the cluster when patching fails due to an immutable field + * change. */ @JsonProperty(value = "force") private Boolean force; + /** Creates an instance of KustomizationPatchDefinition class. */ + public KustomizationPatchDefinition() { + } + /** * Get the path property: The path in the source reference to reconcile on the cluster. * diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/LevelType.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/LevelType.java index 45628120dca83..be243e4ed541e 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/LevelType.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/LevelType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for LevelType. */ +/** Level of the status. */ public final class LevelType extends ExpandableStringEnum { /** Static value Error for LevelType. */ public static final LevelType ERROR = fromString("Error"); @@ -19,6 +19,15 @@ public final class LevelType extends ExpandableStringEnum { /** Static value Information for LevelType. */ public static final LevelType INFORMATION = fromString("Information"); + /** + * Creates a new instance of LevelType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public LevelType() { + } + /** * Creates or finds a LevelType from its string representation. * @@ -30,7 +39,11 @@ public static LevelType fromString(String name) { return fromString(name, LevelType.class); } - /** @return known LevelType values. */ + /** + * Gets known LevelType values. + * + * @return known LevelType values. + */ public static Collection values() { return values(LevelType.class); } diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ManagedIdentityDefinition.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ManagedIdentityDefinition.java new file mode 100644 index 0000000000000..df46aefbdf247 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ManagedIdentityDefinition.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kubernetesconfiguration.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Parameters to authenticate using a Managed Identity. */ +@Fluent +public final class ManagedIdentityDefinition { + /* + * The client Id for authenticating a Managed Identity. + */ + @JsonProperty(value = "clientId") + private String clientId; + + /** Creates an instance of ManagedIdentityDefinition class. */ + public ManagedIdentityDefinition() { + } + + /** + * Get the clientId property: The client Id for authenticating a Managed Identity. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the clientId property: The client Id for authenticating a Managed Identity. + * + * @param clientId the clientId value to set. + * @return the ManagedIdentityDefinition object itself. + */ + public ManagedIdentityDefinition withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ManagedIdentityPatchDefinition.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ManagedIdentityPatchDefinition.java new file mode 100644 index 0000000000000..b7bdc3c988744 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ManagedIdentityPatchDefinition.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kubernetesconfiguration.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Parameters to authenticate using a Managed Identity. */ +@Fluent +public final class ManagedIdentityPatchDefinition { + /* + * The client Id for authenticating a Managed Identity. + */ + @JsonProperty(value = "clientId") + private String clientId; + + /** Creates an instance of ManagedIdentityPatchDefinition class. */ + public ManagedIdentityPatchDefinition() { + } + + /** + * Get the clientId property: The client Id for authenticating a Managed Identity. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the clientId property: The client Id for authenticating a Managed Identity. + * + * @param clientId the clientId value to set. + * @return the ManagedIdentityPatchDefinition object itself. + */ + public ManagedIdentityPatchDefinition withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/MessageLevelType.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/MessageLevelType.java index 6fc8db2a7b7f4..33593bf8e2e1a 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/MessageLevelType.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/MessageLevelType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for MessageLevelType. */ +/** Level of the message. */ public final class MessageLevelType extends ExpandableStringEnum { /** Static value Error for MessageLevelType. */ public static final MessageLevelType ERROR = fromString("Error"); @@ -19,6 +19,15 @@ public final class MessageLevelType extends ExpandableStringEnum values() { return values(MessageLevelType.class); } diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ObjectReferenceDefinition.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ObjectReferenceDefinition.java index 9a9deb997262a..9a9b906b881d1 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ObjectReferenceDefinition.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ObjectReferenceDefinition.java @@ -22,6 +22,10 @@ public final class ObjectReferenceDefinition { @JsonProperty(value = "namespace") private String namespace; + /** Creates an instance of ObjectReferenceDefinition class. */ + public ObjectReferenceDefinition() { + } + /** * Get the name property: Name of the object. * diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ObjectStatusConditionDefinition.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ObjectStatusConditionDefinition.java index fca2030ed55cb..dda7c7f5d27f5 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ObjectStatusConditionDefinition.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ObjectStatusConditionDefinition.java @@ -41,6 +41,10 @@ public final class ObjectStatusConditionDefinition { @JsonProperty(value = "type") private String type; + /** Creates an instance of ObjectStatusConditionDefinition class. */ + public ObjectStatusConditionDefinition() { + } + /** * Get the lastTransitionTime property: Last time this status condition has changed. * diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ObjectStatusDefinition.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ObjectStatusDefinition.java index 58d811f5d1487..22d1c26157449 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ObjectStatusDefinition.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ObjectStatusDefinition.java @@ -30,8 +30,8 @@ public final class ObjectStatusDefinition { private String kind; /* - * Compliance state of the applied object showing whether the applied - * object has come into a ready state on the cluster. + * Compliance state of the applied object showing whether the applied object has come into a ready state on the + * cluster. */ @JsonProperty(value = "complianceState") private FluxComplianceState complianceState; @@ -49,12 +49,15 @@ public final class ObjectStatusDefinition { private List statusConditions; /* - * Additional properties that are provided from objects of the HelmRelease - * kind + * Additional properties that are provided from objects of the HelmRelease kind */ @JsonProperty(value = "helmReleaseProperties") private HelmReleasePropertiesDefinition helmReleaseProperties; + /** Creates an instance of ObjectStatusDefinition class. */ + public ObjectStatusDefinition() { + } + /** * Get the name property: Name of the applied object. * diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/OperationStatus.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/OperationStatus.java index e6fa460a07239..f7bd3d9f6b55f 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/OperationStatus.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/OperationStatus.java @@ -21,18 +21,20 @@ public interface OperationStatus { * @param clusterName The name of the kubernetes cluster. * @param extensionName Name of the Extension. * @param operationId operation Id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return async Operation status. + * @return async Operation status along with {@link Response}. */ - OperationStatusResult get( + Response getWithResponse( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, String extensionName, - String operationId); + String operationId, + Context context); /** * Get Async Operation status. @@ -45,20 +47,18 @@ OperationStatusResult get( * @param clusterName The name of the kubernetes cluster. * @param extensionName Name of the Extension. * @param operationId operation Id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return async Operation status along with {@link Response}. + * @return async Operation status. */ - Response getWithResponse( + OperationStatusResult get( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, String extensionName, - String operationId, - Context context); + String operationId); /** * List Async Operations, currently in progress, in a cluster. diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/OperationStatusList.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/OperationStatusList.java index ecf39c2c185fc..a7ed12a789b26 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/OperationStatusList.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/OperationStatusList.java @@ -24,6 +24,10 @@ public final class OperationStatusList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of OperationStatusList class. */ + public OperationStatusList() { + } + /** * Get the value property: List of async operations in progress, in the cluster. * diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/OperatorScopeType.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/OperatorScopeType.java index 2f7bb7464a80f..d412e86eac33f 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/OperatorScopeType.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/OperatorScopeType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for OperatorScopeType. */ +/** Scope at which the operator will be installed. */ public final class OperatorScopeType extends ExpandableStringEnum { /** Static value cluster for OperatorScopeType. */ public static final OperatorScopeType CLUSTER = fromString("cluster"); @@ -16,6 +16,15 @@ public final class OperatorScopeType extends ExpandableStringEnum values() { return values(OperatorScopeType.class); } diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/OperatorType.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/OperatorType.java index 984777577f852..09aff833fbd97 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/OperatorType.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/OperatorType.java @@ -8,11 +8,20 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for OperatorType. */ +/** Type of the operator. */ public final class OperatorType extends ExpandableStringEnum { /** Static value Flux for OperatorType. */ public static final OperatorType FLUX = fromString("Flux"); + /** + * Creates a new instance of OperatorType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public OperatorType() { + } + /** * Creates or finds a OperatorType from its string representation. * @@ -24,7 +33,11 @@ public static OperatorType fromString(String name) { return fromString(name, OperatorType.class); } - /** @return known OperatorType values. */ + /** + * Gets known OperatorType values. + * + * @return known OperatorType values. + */ public static Collection values() { return values(OperatorType.class); } diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/PatchExtension.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/PatchExtension.java index 770ce8af990e1..a66e8415d3215 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/PatchExtension.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/PatchExtension.java @@ -18,6 +18,10 @@ public final class PatchExtension { @JsonProperty(value = "properties") private PatchExtensionProperties innerProperties; + /** Creates an instance of PatchExtension class. */ + public PatchExtension() { + } + /** * Get the innerProperties property: Updatable properties of an Extension Patch Request. * diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/Plan.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/Plan.java new file mode 100644 index 0000000000000..c35276254d65b --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/Plan.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kubernetesconfiguration.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Plan for the resource. */ +@Fluent +public final class Plan { + /* + * A user defined name of the 3rd Party Artifact that is being procured. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + */ + @JsonProperty(value = "publisher", required = true) + private String publisher; + + /* + * The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the + * artifact at the time of Data Market onboarding. + */ + @JsonProperty(value = "product", required = true) + private String product; + + /* + * A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + */ + @JsonProperty(value = "promotionCode") + private String promotionCode; + + /* + * The version of the desired product/artifact. + */ + @JsonProperty(value = "version") + private String version; + + /** Creates an instance of Plan class. */ + public Plan() { + } + + /** + * Get the name property: A user defined name of the 3rd Party Artifact that is being procured. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: A user defined name of the 3rd Party Artifact that is being procured. + * + * @param name the name value to set. + * @return the Plan object itself. + */ + public Plan withName(String name) { + this.name = name; + return this; + } + + /** + * Get the publisher property: The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic. + * + * @return the publisher value. + */ + public String publisher() { + return this.publisher; + } + + /** + * Set the publisher property: The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic. + * + * @param publisher the publisher value to set. + * @return the Plan object itself. + */ + public Plan withPublisher(String publisher) { + this.publisher = publisher; + return this; + } + + /** + * Get the product property: The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the + * OfferID specified for the artifact at the time of Data Market onboarding. + * + * @return the product value. + */ + public String product() { + return this.product; + } + + /** + * Set the product property: The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the + * OfferID specified for the artifact at the time of Data Market onboarding. + * + * @param product the product value to set. + * @return the Plan object itself. + */ + public Plan withProduct(String product) { + this.product = product; + return this; + } + + /** + * Get the promotionCode property: A publisher provided promotion code as provisioned in Data Market for the said + * product/artifact. + * + * @return the promotionCode value. + */ + public String promotionCode() { + return this.promotionCode; + } + + /** + * Set the promotionCode property: A publisher provided promotion code as provisioned in Data Market for the said + * product/artifact. + * + * @param promotionCode the promotionCode value to set. + * @return the Plan object itself. + */ + public Plan withPromotionCode(String promotionCode) { + this.promotionCode = promotionCode; + return this; + } + + /** + * Get the version property: The version of the desired product/artifact. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: The version of the desired product/artifact. + * + * @param version the version value to set. + * @return the Plan object itself. + */ + public Plan withVersion(String version) { + this.version = version; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("Missing required property name in model Plan")); + } + if (publisher() == null) { + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("Missing required property publisher in model Plan")); + } + if (product() == null) { + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("Missing required property product in model Plan")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(Plan.class); +} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ProvisioningState.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ProvisioningState.java index 814f95bc64c07..4a665022a6493 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ProvisioningState.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ProvisioningState. */ +/** The provisioning state of the resource. */ public final class ProvisioningState extends ExpandableStringEnum { /** Static value Succeeded for ProvisioningState. */ public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); @@ -28,6 +28,15 @@ public final class ProvisioningState extends ExpandableStringEnum values() { return values(ProvisioningState.class); } diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ProvisioningStateType.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ProvisioningStateType.java index 3ba7b515a1c24..5453cc4d374b9 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ProvisioningStateType.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ProvisioningStateType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ProvisioningStateType. */ +/** The provisioning state of the resource provider. */ public final class ProvisioningStateType extends ExpandableStringEnum { /** Static value Accepted for ProvisioningStateType. */ public static final ProvisioningStateType ACCEPTED = fromString("Accepted"); @@ -25,6 +25,15 @@ public final class ProvisioningStateType extends ExpandableStringEnum values() { return values(ProvisioningStateType.class); } diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/RepositoryRefDefinition.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/RepositoryRefDefinition.java index 2eaba6f92e0a2..5c00bc7cd7c71 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/RepositoryRefDefinition.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/RepositoryRefDefinition.java @@ -17,26 +17,28 @@ public final class RepositoryRefDefinition { private String branch; /* - * The git repository tag name to checkout. This takes precedence over - * branch. + * The git repository tag name to checkout. This takes precedence over branch. */ @JsonProperty(value = "tag") private String tag; /* - * The semver range used to match against git repository tags. This takes - * precedence over tag. + * The semver range used to match against git repository tags. This takes precedence over tag. */ @JsonProperty(value = "semver") private String semver; /* - * The commit SHA to checkout. This value must be combined with the branch - * name to be valid. This takes precedence over semver. + * The commit SHA to checkout. This value must be combined with the branch name to be valid. This takes precedence + * over semver. */ @JsonProperty(value = "commit") private String commit; + /** Creates an instance of RepositoryRefDefinition class. */ + public RepositoryRefDefinition() { + } + /** * Get the branch property: The git repository branch name to checkout. * diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ResourceIdentityType.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ResourceIdentityType.java index 9b2c1ff1c2841..0f1705448b5db 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ResourceIdentityType.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ResourceIdentityType.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Defines values for ResourceIdentityType. */ +/** The identity type. */ public enum ResourceIdentityType { /** Enum value SystemAssigned. */ SYSTEM_ASSIGNED("SystemAssigned"); @@ -27,6 +27,9 @@ public enum ResourceIdentityType { */ @JsonCreator public static ResourceIdentityType fromString(String value) { + if (value == null) { + return null; + } ResourceIdentityType[] items = ResourceIdentityType.values(); for (ResourceIdentityType item : items) { if (item.toString().equalsIgnoreCase(value)) { @@ -36,6 +39,7 @@ public static ResourceIdentityType fromString(String value) { return null; } + /** {@inheritDoc} */ @JsonValue @Override public String toString() { diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ResourceProviderOperationDisplay.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ResourceProviderOperationDisplay.java index cd1496447ab4e..e2fe3a14622b3 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ResourceProviderOperationDisplay.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ResourceProviderOperationDisplay.java @@ -34,6 +34,10 @@ public final class ResourceProviderOperationDisplay { @JsonProperty(value = "description") private String description; + /** Creates an instance of ResourceProviderOperationDisplay class. */ + public ResourceProviderOperationDisplay() { + } + /** * Get the provider property: Resource provider: Microsoft KubernetesConfiguration. * diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ResourceProviderOperationList.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ResourceProviderOperationList.java index 68e4b9f3a2f5c..0d4f35c071209 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ResourceProviderOperationList.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ResourceProviderOperationList.java @@ -24,6 +24,10 @@ public final class ResourceProviderOperationList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of ResourceProviderOperationList class. */ + public ResourceProviderOperationList() { + } + /** * Get the value property: List of operations supported by this resource provider. * diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/Scope.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/Scope.java index e03a67a631274..c8e2ae39e7474 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/Scope.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/Scope.java @@ -22,6 +22,10 @@ public final class Scope { @JsonProperty(value = "namespace") private ScopeNamespace namespace; + /** Creates an instance of Scope class. */ + public Scope() { + } + /** * Get the cluster property: Specifies that the scope of the extension is Cluster. * diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ScopeCluster.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ScopeCluster.java index 6a3a85031fe5f..d115f67d8cd66 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ScopeCluster.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ScopeCluster.java @@ -11,12 +11,16 @@ @Fluent public final class ScopeCluster { /* - * Namespace where the extension Release must be placed, for a Cluster - * scoped extension. If this namespace does not exist, it will be created + * Namespace where the extension Release must be placed, for a Cluster scoped extension. If this namespace does + * not exist, it will be created */ @JsonProperty(value = "releaseNamespace") private String releaseNamespace; + /** Creates an instance of ScopeCluster class. */ + public ScopeCluster() { + } + /** * Get the releaseNamespace property: Namespace where the extension Release must be placed, for a Cluster scoped * extension. If this namespace does not exist, it will be created. diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ScopeNamespace.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ScopeNamespace.java index 558620cda1565..ea2cf5502df03 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ScopeNamespace.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ScopeNamespace.java @@ -11,12 +11,16 @@ @Fluent public final class ScopeNamespace { /* - * Namespace where the extension will be created for an Namespace scoped - * extension. If this namespace does not exist, it will be created + * Namespace where the extension will be created for an Namespace scoped extension. If this namespace does not + * exist, it will be created */ @JsonProperty(value = "targetNamespace") private String targetNamespace; + /** Creates an instance of ScopeNamespace class. */ + public ScopeNamespace() { + } + /** * Get the targetNamespace property: Namespace where the extension will be created for an Namespace scoped * extension. If this namespace does not exist, it will be created. diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ScopeType.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ScopeType.java index 9e35c0b620612..461e08b5b3c9d 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ScopeType.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ScopeType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ScopeType. */ +/** Scope at which the configuration will be installed. */ public final class ScopeType extends ExpandableStringEnum { /** Static value cluster for ScopeType. */ public static final ScopeType CLUSTER = fromString("cluster"); @@ -16,6 +16,15 @@ public final class ScopeType extends ExpandableStringEnum { /** Static value namespace for ScopeType. */ public static final ScopeType NAMESPACE = fromString("namespace"); + /** + * Creates a new instance of ScopeType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ScopeType() { + } + /** * Creates or finds a ScopeType from its string representation. * @@ -27,7 +36,11 @@ public static ScopeType fromString(String name) { return fromString(name, ScopeType.class); } - /** @return known ScopeType values. */ + /** + * Gets known ScopeType values. + * + * @return known ScopeType values. + */ public static Collection values() { return values(ScopeType.class); } diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ServicePrincipalDefinition.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ServicePrincipalDefinition.java new file mode 100644 index 0000000000000..10957188fa1d5 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ServicePrincipalDefinition.java @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kubernetesconfiguration.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Parameters to authenticate using Service Principal. */ +@Fluent +public final class ServicePrincipalDefinition { + /* + * The client Id for authenticating a Service Principal. + */ + @JsonProperty(value = "clientId") + private String clientId; + + /* + * The tenant Id for authenticating a Service Principal + */ + @JsonProperty(value = "tenantId") + private String tenantId; + + /* + * The client secret for authenticating a Service Principal + */ + @JsonProperty(value = "clientSecret") + private String clientSecret; + + /* + * Base64-encoded certificate used to authenticate a Service Principal + */ + @JsonProperty(value = "clientCertificate") + private String clientCertificate; + + /* + * The password for the certificate used to authenticate a Service Principal + */ + @JsonProperty(value = "clientCertificatePassword") + private String clientCertificatePassword; + + /* + * Specifies whether to include x5c header in client claims when acquiring a token to enable subject name / issuer + * based authentication for the Client Certificate + */ + @JsonProperty(value = "clientCertificateSendChain") + private Boolean clientCertificateSendChain; + + /** Creates an instance of ServicePrincipalDefinition class. */ + public ServicePrincipalDefinition() { + } + + /** + * Get the clientId property: The client Id for authenticating a Service Principal. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the clientId property: The client Id for authenticating a Service Principal. + * + * @param clientId the clientId value to set. + * @return the ServicePrincipalDefinition object itself. + */ + public ServicePrincipalDefinition withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get the tenantId property: The tenant Id for authenticating a Service Principal. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: The tenant Id for authenticating a Service Principal. + * + * @param tenantId the tenantId value to set. + * @return the ServicePrincipalDefinition object itself. + */ + public ServicePrincipalDefinition withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the clientSecret property: The client secret for authenticating a Service Principal. + * + * @return the clientSecret value. + */ + public String clientSecret() { + return this.clientSecret; + } + + /** + * Set the clientSecret property: The client secret for authenticating a Service Principal. + * + * @param clientSecret the clientSecret value to set. + * @return the ServicePrincipalDefinition object itself. + */ + public ServicePrincipalDefinition withClientSecret(String clientSecret) { + this.clientSecret = clientSecret; + return this; + } + + /** + * Get the clientCertificate property: Base64-encoded certificate used to authenticate a Service Principal. + * + * @return the clientCertificate value. + */ + public String clientCertificate() { + return this.clientCertificate; + } + + /** + * Set the clientCertificate property: Base64-encoded certificate used to authenticate a Service Principal. + * + * @param clientCertificate the clientCertificate value to set. + * @return the ServicePrincipalDefinition object itself. + */ + public ServicePrincipalDefinition withClientCertificate(String clientCertificate) { + this.clientCertificate = clientCertificate; + return this; + } + + /** + * Get the clientCertificatePassword property: The password for the certificate used to authenticate a Service + * Principal. + * + * @return the clientCertificatePassword value. + */ + public String clientCertificatePassword() { + return this.clientCertificatePassword; + } + + /** + * Set the clientCertificatePassword property: The password for the certificate used to authenticate a Service + * Principal. + * + * @param clientCertificatePassword the clientCertificatePassword value to set. + * @return the ServicePrincipalDefinition object itself. + */ + public ServicePrincipalDefinition withClientCertificatePassword(String clientCertificatePassword) { + this.clientCertificatePassword = clientCertificatePassword; + return this; + } + + /** + * Get the clientCertificateSendChain property: Specifies whether to include x5c header in client claims when + * acquiring a token to enable subject name / issuer based authentication for the Client Certificate. + * + * @return the clientCertificateSendChain value. + */ + public Boolean clientCertificateSendChain() { + return this.clientCertificateSendChain; + } + + /** + * Set the clientCertificateSendChain property: Specifies whether to include x5c header in client claims when + * acquiring a token to enable subject name / issuer based authentication for the Client Certificate. + * + * @param clientCertificateSendChain the clientCertificateSendChain value to set. + * @return the ServicePrincipalDefinition object itself. + */ + public ServicePrincipalDefinition withClientCertificateSendChain(Boolean clientCertificateSendChain) { + this.clientCertificateSendChain = clientCertificateSendChain; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ServicePrincipalPatchDefinition.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ServicePrincipalPatchDefinition.java new file mode 100644 index 0000000000000..d855b015d498f --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ServicePrincipalPatchDefinition.java @@ -0,0 +1,185 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kubernetesconfiguration.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Parameters to authenticate using Service Principal. */ +@Fluent +public final class ServicePrincipalPatchDefinition { + /* + * The client Id for authenticating a Service Principal. + */ + @JsonProperty(value = "clientId") + private String clientId; + + /* + * The tenant Id for authenticating a Service Principal + */ + @JsonProperty(value = "tenantId") + private String tenantId; + + /* + * The client secret for authenticating a Service Principal + */ + @JsonProperty(value = "clientSecret") + private String clientSecret; + + /* + * Base64-encoded certificate used to authenticate a Service Principal + */ + @JsonProperty(value = "clientCertificate") + private String clientCertificate; + + /* + * The password for the certificate used to authenticate a Service Principal + */ + @JsonProperty(value = "clientCertificatePassword") + private String clientCertificatePassword; + + /* + * Specifies whether to include x5c header in client claims when acquiring a token to enable subject name / issuer + * based authentication for the Client Certificate + */ + @JsonProperty(value = "clientCertificateSendChain") + private Boolean clientCertificateSendChain; + + /** Creates an instance of ServicePrincipalPatchDefinition class. */ + public ServicePrincipalPatchDefinition() { + } + + /** + * Get the clientId property: The client Id for authenticating a Service Principal. + * + * @return the clientId value. + */ + public String clientId() { + return this.clientId; + } + + /** + * Set the clientId property: The client Id for authenticating a Service Principal. + * + * @param clientId the clientId value to set. + * @return the ServicePrincipalPatchDefinition object itself. + */ + public ServicePrincipalPatchDefinition withClientId(String clientId) { + this.clientId = clientId; + return this; + } + + /** + * Get the tenantId property: The tenant Id for authenticating a Service Principal. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Set the tenantId property: The tenant Id for authenticating a Service Principal. + * + * @param tenantId the tenantId value to set. + * @return the ServicePrincipalPatchDefinition object itself. + */ + public ServicePrincipalPatchDefinition withTenantId(String tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the clientSecret property: The client secret for authenticating a Service Principal. + * + * @return the clientSecret value. + */ + public String clientSecret() { + return this.clientSecret; + } + + /** + * Set the clientSecret property: The client secret for authenticating a Service Principal. + * + * @param clientSecret the clientSecret value to set. + * @return the ServicePrincipalPatchDefinition object itself. + */ + public ServicePrincipalPatchDefinition withClientSecret(String clientSecret) { + this.clientSecret = clientSecret; + return this; + } + + /** + * Get the clientCertificate property: Base64-encoded certificate used to authenticate a Service Principal. + * + * @return the clientCertificate value. + */ + public String clientCertificate() { + return this.clientCertificate; + } + + /** + * Set the clientCertificate property: Base64-encoded certificate used to authenticate a Service Principal. + * + * @param clientCertificate the clientCertificate value to set. + * @return the ServicePrincipalPatchDefinition object itself. + */ + public ServicePrincipalPatchDefinition withClientCertificate(String clientCertificate) { + this.clientCertificate = clientCertificate; + return this; + } + + /** + * Get the clientCertificatePassword property: The password for the certificate used to authenticate a Service + * Principal. + * + * @return the clientCertificatePassword value. + */ + public String clientCertificatePassword() { + return this.clientCertificatePassword; + } + + /** + * Set the clientCertificatePassword property: The password for the certificate used to authenticate a Service + * Principal. + * + * @param clientCertificatePassword the clientCertificatePassword value to set. + * @return the ServicePrincipalPatchDefinition object itself. + */ + public ServicePrincipalPatchDefinition withClientCertificatePassword(String clientCertificatePassword) { + this.clientCertificatePassword = clientCertificatePassword; + return this; + } + + /** + * Get the clientCertificateSendChain property: Specifies whether to include x5c header in client claims when + * acquiring a token to enable subject name / issuer based authentication for the Client Certificate. + * + * @return the clientCertificateSendChain value. + */ + public Boolean clientCertificateSendChain() { + return this.clientCertificateSendChain; + } + + /** + * Set the clientCertificateSendChain property: Specifies whether to include x5c header in client claims when + * acquiring a token to enable subject name / issuer based authentication for the Client Certificate. + * + * @param clientCertificateSendChain the clientCertificateSendChain value to set. + * @return the ServicePrincipalPatchDefinition object itself. + */ + public ServicePrincipalPatchDefinition withClientCertificateSendChain(Boolean clientCertificateSendChain) { + this.clientCertificateSendChain = clientCertificateSendChain; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/SourceControlConfigurationList.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/SourceControlConfigurationList.java index 8547cff8a3b3c..84d87e095b9a4 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/SourceControlConfigurationList.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/SourceControlConfigurationList.java @@ -27,6 +27,10 @@ public final class SourceControlConfigurationList { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of SourceControlConfigurationList class. */ + public SourceControlConfigurationList() { + } + /** * Get the value property: List of Source Control Configurations within a Kubernetes cluster. * diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/SourceControlConfigurations.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/SourceControlConfigurations.java index 1bc79a3794e6a..239be141445ce 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/SourceControlConfigurations.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/SourceControlConfigurations.java @@ -21,17 +21,19 @@ public interface SourceControlConfigurations { * provisionedClusters. * @param clusterName The name of the kubernetes cluster. * @param sourceControlConfigurationName Name of the Source Control Configuration. + * @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 details of the Source Control Configuration. + * @return details of the Source Control Configuration along with {@link Response}. */ - SourceControlConfiguration get( + Response getWithResponse( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, - String sourceControlConfigurationName); + String sourceControlConfigurationName, + Context context); /** * Gets details of the Source Control Configuration. @@ -43,19 +45,17 @@ SourceControlConfiguration get( * provisionedClusters. * @param clusterName The name of the kubernetes cluster. * @param sourceControlConfigurationName Name of the Source Control Configuration. - * @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 details of the Source Control Configuration along with {@link Response}. + * @return details of the Source Control Configuration. */ - Response getWithResponse( + SourceControlConfiguration get( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, - String sourceControlConfigurationName, - Context context); + String sourceControlConfigurationName); /** * Create a new Kubernetes Source Control Configuration. @@ -68,18 +68,20 @@ Response getWithResponse( * @param clusterName The name of the kubernetes cluster. * @param sourceControlConfigurationName Name of the Source Control Configuration. * @param sourceControlConfiguration Properties necessary to Create KubernetesConfiguration. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the SourceControl Configuration object returned in Get & Put response. + * @return the SourceControl Configuration object returned in Get & Put response along with {@link Response}. */ - SourceControlConfiguration createOrUpdate( + Response createOrUpdateWithResponse( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, String sourceControlConfigurationName, - SourceControlConfigurationInner sourceControlConfiguration); + SourceControlConfigurationInner sourceControlConfiguration, + Context context); /** * Create a new Kubernetes Source Control Configuration. @@ -92,20 +94,18 @@ SourceControlConfiguration createOrUpdate( * @param clusterName The name of the kubernetes cluster. * @param sourceControlConfigurationName Name of the Source Control Configuration. * @param sourceControlConfiguration Properties necessary to Create KubernetesConfiguration. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the SourceControl Configuration object returned in Get & Put response along with {@link Response}. + * @return the SourceControl Configuration object returned in Get & Put response. */ - Response createOrUpdateWithResponse( + SourceControlConfiguration createOrUpdate( String resourceGroupName, String clusterRp, String clusterResourceName, String clusterName, String sourceControlConfigurationName, - SourceControlConfigurationInner sourceControlConfiguration, - Context context); + SourceControlConfigurationInner sourceControlConfiguration); /** * This will delete the YAML file used to set up the Source control configuration, thus stopping future sync from diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/SourceKindType.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/SourceKindType.java index cd8c824097702..ff35cf3b76bef 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/SourceKindType.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/SourceKindType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SourceKindType. */ +/** Source Kind to pull the configuration data from. */ public final class SourceKindType extends ExpandableStringEnum { /** Static value GitRepository for SourceKindType. */ public static final SourceKindType GIT_REPOSITORY = fromString("GitRepository"); @@ -16,6 +16,18 @@ public final class SourceKindType extends ExpandableStringEnum { /** Static value Bucket for SourceKindType. */ public static final SourceKindType BUCKET = fromString("Bucket"); + /** Static value AzureBlob for SourceKindType. */ + public static final SourceKindType AZURE_BLOB = fromString("AzureBlob"); + + /** + * Creates a new instance of SourceKindType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SourceKindType() { + } + /** * Creates or finds a SourceKindType from its string representation. * @@ -27,7 +39,11 @@ public static SourceKindType fromString(String name) { return fromString(name, SourceKindType.class); } - /** @return known SourceKindType values. */ + /** + * Gets known SourceKindType values. + * + * @return known SourceKindType values. + */ public static Collection values() { return values(SourceKindType.class); } diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/ExtensionsCreateSamples.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/ExtensionsCreateSamples.java index 7c4ce4c434e79..3303bdfce2b4e 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/ExtensionsCreateSamples.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/ExtensionsCreateSamples.java @@ -4,8 +4,8 @@ package com.azure.resourcemanager.kubernetesconfiguration.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.ExtensionInner; +import com.azure.resourcemanager.kubernetesconfiguration.models.Plan; import com.azure.resourcemanager.kubernetesconfiguration.models.Scope; import com.azure.resourcemanager.kubernetesconfiguration.models.ScopeCluster; import java.util.HashMap; @@ -14,7 +14,7 @@ /** Samples for Extensions Create. */ public final class ExtensionsCreateSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/CreateExtension.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/CreateExtension.json */ /** * Sample code: Create Extension. @@ -43,7 +43,37 @@ public static void createExtension( "omsagent.secret.wsid", "a38cef99-5a89-52ed-b6db-22095c23664b")) .withConfigurationProtectedSettings(mapOf("omsagent.secret.key", "secretKeyValue01")), - Context.NONE); + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/CreateExtensionWithPlan.json + */ + /** + * Sample code: Create Extension with Plan. + * + * @param manager Entry point to SourceControlConfigurationManager. + */ + public static void createExtensionWithPlan( + com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager manager) { + manager + .extensions() + .create( + "rg1", + "Microsoft.Kubernetes", + "connectedClusters", + "clusterName1", + "azureVote", + new ExtensionInner() + .withPlan( + new Plan() + .withName("azure-vote-standard") + .withPublisher("Microsoft") + .withProduct("azure-vote-standard-offer-id")) + .withExtensionType("azure-vote") + .withAutoUpgradeMinorVersion(true) + .withReleaseTrain("Preview"), + com.azure.core.util.Context.NONE); } @SuppressWarnings("unchecked") diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/ExtensionsDeleteSamples.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/ExtensionsDeleteSamples.java index be0f26a7e2a59..05cf0c7e2a949 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/ExtensionsDeleteSamples.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/ExtensionsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.kubernetesconfiguration.generated; -import com.azure.core.util.Context; - /** Samples for Extensions Delete. */ public final class ExtensionsDeleteSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/DeleteExtension.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/DeleteExtension.json */ /** * Sample code: Delete Extension. @@ -27,6 +25,6 @@ public static void deleteExtension( "clusterName1", "ClusterMonitor", null, - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/ExtensionsGetSamples.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/ExtensionsGetSamples.java index 52d6110cb0263..a9ed25e9bda9b 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/ExtensionsGetSamples.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/ExtensionsGetSamples.java @@ -4,12 +4,31 @@ package com.azure.resourcemanager.kubernetesconfiguration.generated; -import com.azure.core.util.Context; - /** Samples for Extensions Get. */ public final class ExtensionsGetSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/GetExtension.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/GetExtensionWithPlan.json + */ + /** + * Sample code: Get Extension with Plan. + * + * @param manager Entry point to SourceControlConfigurationManager. + */ + public static void getExtensionWithPlan( + com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager manager) { + manager + .extensions() + .getWithResponse( + "rg1", + "Microsoft.Kubernetes", + "connectedClusters", + "clusterName1", + "azureVote", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/GetExtension.json */ /** * Sample code: Get Extension. @@ -21,6 +40,11 @@ public static void getExtension( manager .extensions() .getWithResponse( - "rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", "ClusterMonitor", Context.NONE); + "rg1", + "Microsoft.Kubernetes", + "connectedClusters", + "clusterName1", + "ClusterMonitor", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/ExtensionsListSamples.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/ExtensionsListSamples.java index 08d89817eeec2..50f4e94a7c00e 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/ExtensionsListSamples.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/ExtensionsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.kubernetesconfiguration.generated; -import com.azure.core.util.Context; - /** Samples for Extensions List. */ public final class ExtensionsListSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/ListExtensions.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/ListExtensions.json */ /** * Sample code: List Extensions. @@ -18,6 +16,8 @@ public final class ExtensionsListSamples { */ public static void listExtensions( com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager manager) { - manager.extensions().list("rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", Context.NONE); + manager + .extensions() + .list("rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/ExtensionsUpdateSamples.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/ExtensionsUpdateSamples.java index b89348741325a..192d7b102ed5e 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/ExtensionsUpdateSamples.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/ExtensionsUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.kubernetesconfiguration.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.kubernetesconfiguration.models.PatchExtension; import java.util.HashMap; import java.util.Map; @@ -12,7 +11,7 @@ /** Samples for Extensions Update. */ public final class ExtensionsUpdateSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/PatchExtension.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/PatchExtension.json */ /** * Sample code: Update Extension. @@ -39,7 +38,7 @@ public static void updateExtension( "omsagent.secret.wsid", "a38cef99-5a89-52ed-b6db-22095c23664b")) .withConfigurationProtectedSettings(mapOf("omsagent.secret.key", "secretKeyValue01")), - Context.NONE); + com.azure.core.util.Context.NONE); } @SuppressWarnings("unchecked") diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/FluxConfigOperationStatusGetSamples.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/FluxConfigOperationStatusGetSamples.java index 76de78984aba1..249332f71c531 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/FluxConfigOperationStatusGetSamples.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/FluxConfigOperationStatusGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.kubernetesconfiguration.generated; -import com.azure.core.util.Context; - /** Samples for FluxConfigOperationStatus Get. */ public final class FluxConfigOperationStatusGetSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/GetFluxConfigurationAsyncOperationStatus.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/GetFluxConfigurationAsyncOperationStatus.json */ /** * Sample code: FluxConfigurationAsyncOperationStatus Get. @@ -27,6 +25,6 @@ public static void fluxConfigurationAsyncOperationStatusGet( "clusterName1", "srs-fluxconfig", "99999999-9999-9999-9999-999999999999", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/FluxConfigurationsCreateOrUpdateSamples.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/FluxConfigurationsCreateOrUpdateSamples.java index cfffcacbec2d9..e73b2c171dff3 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/FluxConfigurationsCreateOrUpdateSamples.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/FluxConfigurationsCreateOrUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.kubernetesconfiguration.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.FluxConfigurationInner; import com.azure.resourcemanager.kubernetesconfiguration.models.BucketDefinition; import com.azure.resourcemanager.kubernetesconfiguration.models.GitRepositoryDefinition; @@ -19,7 +18,7 @@ /** Samples for FluxConfigurations CreateOrUpdate. */ public final class FluxConfigurationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/CreateFluxConfiguration.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/CreateFluxConfiguration.json */ /** * Sample code: Create Flux Configuration. @@ -64,11 +63,11 @@ public static void createFluxConfiguration( .withSyncIntervalInSeconds(600L) .withRetryIntervalInSeconds(600L) .withPrune(false))), - Context.NONE); + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/CreateFluxConfigurationWithBucket.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/CreateFluxConfigurationWithBucket.json */ /** * Sample code: Create Flux Configuration with Bucket Source Kind. @@ -96,7 +95,7 @@ public static void createFluxConfigurationWithBucketSourceKind( .withBucketName("flux") .withTimeoutInSeconds(1000L) .withSyncIntervalInSeconds(1000L) - .withAccessKey("fluxminiotest")) + .withAccessKey("fakeTokenPlaceholder")) .withKustomizations( mapOf( "srs-kustomization1", @@ -113,7 +112,7 @@ public static void createFluxConfigurationWithBucketSourceKind( .withSyncIntervalInSeconds(600L) .withRetryIntervalInSeconds(600L) .withPrune(false))), - Context.NONE); + com.azure.core.util.Context.NONE); } @SuppressWarnings("unchecked") diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/FluxConfigurationsDeleteSamples.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/FluxConfigurationsDeleteSamples.java index 5203c96c5d252..e7aa30d35c8e2 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/FluxConfigurationsDeleteSamples.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/FluxConfigurationsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.kubernetesconfiguration.generated; -import com.azure.core.util.Context; - /** Samples for FluxConfigurations Delete. */ public final class FluxConfigurationsDeleteSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/DeleteFluxConfiguration.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/DeleteFluxConfiguration.json */ /** * Sample code: Delete Flux Configuration. @@ -27,6 +25,6 @@ public static void deleteFluxConfiguration( "clusterName1", "srs-fluxconfig", null, - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/FluxConfigurationsGetSamples.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/FluxConfigurationsGetSamples.java index dbc0b74c0f313..ab712a6614afd 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/FluxConfigurationsGetSamples.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/FluxConfigurationsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.kubernetesconfiguration.generated; -import com.azure.core.util.Context; - /** Samples for FluxConfigurations Get. */ public final class FluxConfigurationsGetSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/GetFluxConfiguration.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/GetFluxConfiguration.json */ /** * Sample code: Get Flux Configuration. @@ -21,6 +19,11 @@ public static void getFluxConfiguration( manager .fluxConfigurations() .getWithResponse( - "rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", "srs-fluxconfig", Context.NONE); + "rg1", + "Microsoft.Kubernetes", + "connectedClusters", + "clusterName1", + "srs-fluxconfig", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/FluxConfigurationsListSamples.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/FluxConfigurationsListSamples.java index c63af333f8248..d072341a1dc96 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/FluxConfigurationsListSamples.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/FluxConfigurationsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.kubernetesconfiguration.generated; -import com.azure.core.util.Context; - /** Samples for FluxConfigurations List. */ public final class FluxConfigurationsListSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/ListFluxConfigurations.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/ListFluxConfigurations.json */ /** * Sample code: List Flux Configuration. @@ -20,6 +18,6 @@ public static void listFluxConfiguration( com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager manager) { manager .fluxConfigurations() - .list("rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", Context.NONE); + .list("rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/FluxConfigurationsUpdateSamples.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/FluxConfigurationsUpdateSamples.java index c9be514f29647..8248b18c9e077 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/FluxConfigurationsUpdateSamples.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/FluxConfigurationsUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.kubernetesconfiguration.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.kubernetesconfiguration.models.FluxConfigurationPatch; import com.azure.resourcemanager.kubernetesconfiguration.models.GitRepositoryPatchDefinition; import com.azure.resourcemanager.kubernetesconfiguration.models.KustomizationPatchDefinition; @@ -14,7 +13,7 @@ /** Samples for FluxConfigurations Update. */ public final class FluxConfigurationsUpdateSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/PatchFluxConfiguration.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/PatchFluxConfiguration.json */ /** * Sample code: Patch Flux Configuration. @@ -48,7 +47,7 @@ public static void patchFluxConfiguration( new KustomizationPatchDefinition() .withPath("./test/another-path") .withSyncIntervalInSeconds(300L))), - Context.NONE); + com.azure.core.util.Context.NONE); } @SuppressWarnings("unchecked") diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/OperationStatusGetSamples.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/OperationStatusGetSamples.java index 7a061fc01dc91..3521ec08409be 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/OperationStatusGetSamples.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/OperationStatusGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.kubernetesconfiguration.generated; -import com.azure.core.util.Context; - /** Samples for OperationStatus Get. */ public final class OperationStatusGetSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/GetExtensionAsyncOperationStatus.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/GetExtensionAsyncOperationStatus.json */ /** * Sample code: ExtensionAsyncOperationStatus Get. @@ -27,6 +25,6 @@ public static void extensionAsyncOperationStatusGet( "clusterName1", "ClusterMonitor", "99999999-9999-9999-9999-999999999999", - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/OperationStatusListSamples.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/OperationStatusListSamples.java index 043452252d062..384f37459e896 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/OperationStatusListSamples.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/OperationStatusListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.kubernetesconfiguration.generated; -import com.azure.core.util.Context; - /** Samples for OperationStatus List. */ public final class OperationStatusListSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/ListAsyncOperationStatus.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/ListAsyncOperationStatus.json */ /** * Sample code: AsyncOperationStatus List. @@ -20,6 +18,6 @@ public static void asyncOperationStatusList( com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager manager) { manager .operationStatus() - .list("rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", Context.NONE); + .list("rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/OperationsListSamples.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/OperationsListSamples.java index 4c86ca6e4d011..87dc3e2cd8216 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/OperationsListSamples.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/OperationsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.kubernetesconfiguration.generated; -import com.azure.core.util.Context; - /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/OperationsList.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/OperationsList.json */ /** * Sample code: BatchAccountDelete. @@ -18,6 +16,6 @@ public final class OperationsListSamples { */ public static void batchAccountDelete( com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager manager) { - manager.operations().list(Context.NONE); + manager.operations().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/SourceControlConfigurationsCreateOrUpdateSamples.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/SourceControlConfigurationsCreateOrUpdateSamples.java index 6e8c76fa604bc..8f5340d6e88a3 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/SourceControlConfigurationsCreateOrUpdateSamples.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/SourceControlConfigurationsCreateOrUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.kubernetesconfiguration.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.SourceControlConfigurationInner; import com.azure.resourcemanager.kubernetesconfiguration.models.HelmOperatorProperties; import com.azure.resourcemanager.kubernetesconfiguration.models.OperatorScopeType; @@ -15,7 +14,7 @@ /** Samples for SourceControlConfigurations CreateOrUpdate. */ public final class SourceControlConfigurationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/CreateSourceControlConfiguration.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/CreateSourceControlConfiguration.json */ /** * Sample code: Create Source Control Configuration. @@ -48,7 +47,7 @@ public static void createSourceControlConfiguration( .withChartVersion("0.3.0") .withChartValues( "--set git.ssh.secretName=flux-git-deploy --set tillerNamespace=kube-system")), - Context.NONE); + com.azure.core.util.Context.NONE); } @SuppressWarnings("unchecked") diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/SourceControlConfigurationsDeleteSamples.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/SourceControlConfigurationsDeleteSamples.java index 60d189272ec27..0e3c0e563b223 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/SourceControlConfigurationsDeleteSamples.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/SourceControlConfigurationsDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.kubernetesconfiguration.generated; -import com.azure.core.util.Context; - /** Samples for SourceControlConfigurations Delete. */ public final class SourceControlConfigurationsDeleteSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/DeleteSourceControlConfiguration.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/DeleteSourceControlConfiguration.json */ /** * Sample code: Delete Source Control Configuration. @@ -21,6 +19,11 @@ public static void deleteSourceControlConfiguration( manager .sourceControlConfigurations() .delete( - "rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", "SRS_GitHubConfig", Context.NONE); + "rg1", + "Microsoft.Kubernetes", + "connectedClusters", + "clusterName1", + "SRS_GitHubConfig", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/SourceControlConfigurationsGetSamples.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/SourceControlConfigurationsGetSamples.java index 23dbe750d4c19..865978aae4080 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/SourceControlConfigurationsGetSamples.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/SourceControlConfigurationsGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.kubernetesconfiguration.generated; -import com.azure.core.util.Context; - /** Samples for SourceControlConfigurations Get. */ public final class SourceControlConfigurationsGetSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/GetSourceControlConfiguration.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/GetSourceControlConfiguration.json */ /** * Sample code: Get Source Control Configuration. @@ -21,6 +19,11 @@ public static void getSourceControlConfiguration( manager .sourceControlConfigurations() .getWithResponse( - "rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", "SRS_GitHubConfig", Context.NONE); + "rg1", + "Microsoft.Kubernetes", + "connectedClusters", + "clusterName1", + "SRS_GitHubConfig", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/SourceControlConfigurationsListSamples.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/SourceControlConfigurationsListSamples.java index af14d84b94a8a..05cb333cbaad7 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/SourceControlConfigurationsListSamples.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/samples/java/com/azure/resourcemanager/kubernetesconfiguration/generated/SourceControlConfigurationsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.kubernetesconfiguration.generated; -import com.azure.core.util.Context; - /** Samples for SourceControlConfigurations List. */ public final class SourceControlConfigurationsListSamples { /* - * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-03-01/examples/ListSourceControlConfiguration.json + * x-ms-original-file: specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/stable/2022-11-01/examples/ListSourceControlConfiguration.json */ /** * Sample code: List Source Control Configuration. @@ -20,6 +18,6 @@ public static void listSourceControlConfiguration( com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager manager) { manager .sourceControlConfigurations() - .list("rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", Context.NONE); + .list("rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", com.azure.core.util.Context.NONE); } }