From 912fecdfbac9a9ceb90561aab89fb7525032fb94 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 7 May 2021 03:22:21 +0000 Subject: [PATCH] CodeGen from PR 14302 in Azure/azure-rest-api-specs Merge e16440efb4764a1a1637a52823dacac2a7949dfb into 3f1e770aa89c7d306d7cdb4f7aa852819d2f9fa8 --- .../CHANGELOG.md | 3 +- .../README.md | 4 +- .../pom.xml | 2 +- .../SourceControlConfigurationManager.java | 74 + .../fluent/ClusterExtensionTypesClient.java | 64 + ...ClusterExtensionTypesOperationsClient.java | 47 + .../fluent/ExtensionTypeVersionsClient.java | 41 + .../fluent/ExtensionsClient.java | 339 ++++ .../fluent/LocationExtensionTypesClient.java | 39 + .../fluent/OperationStatusClient.java | 113 ++ .../SourceControlConfigurationClient.java | 44 +- .../SourceControlConfigurationsClient.java | 64 +- .../fluent/models/ExtensionInner.java | 374 ++++ .../fluent/models/ExtensionTypeInner.java | 93 + .../models/OperationStatusResultInner.java | 151 ++ .../ResourceProviderOperationInner.java | 29 + .../ClusterExtensionTypesClientImpl.java | 303 ++++ .../ClusterExtensionTypesImpl.java | 77 + ...terExtensionTypesOperationsClientImpl.java | 366 ++++ .../ClusterExtensionTypesOperationsImpl.java | 51 + .../implementation/ExtensionImpl.java | 126 ++ .../implementation/ExtensionTypeImpl.java | 55 + .../ExtensionTypeVersionsClientImpl.java | 339 ++++ .../ExtensionTypeVersionsImpl.java | 45 + .../implementation/ExtensionsClientImpl.java | 1548 +++++++++++++++++ .../implementation/ExtensionsImpl.java | 173 ++ .../LocationExtensionTypesClientImpl.java | 315 ++++ .../LocationExtensionTypesImpl.java | 47 + .../OperationStatusClientImpl.java | 673 +++++++ .../implementation/OperationStatusImpl.java | 110 ++ .../OperationStatusResultImpl.java | 57 + .../ResourceProviderOperationImpl.java | 4 + ...urceControlConfigurationClientBuilder.java | 5 +- .../SourceControlConfigurationClientImpl.java | 93 +- ...SourceControlConfigurationsClientImpl.java | 176 +- .../SourceControlConfigurationsImpl.java | 36 +- .../ClusterExtensionTypeClusterType.java | 34 + .../models/ClusterExtensionTypes.java | 57 + .../ClusterExtensionTypesOperations.java | 41 + .../models/ClusterScopeSettings.java | 79 + .../models/ClusterTypes.java | 47 + .../models/Extension.java | 147 ++ .../models/ExtensionStatus.java | 154 ++ .../models/ExtensionType.java | 47 + .../models/ExtensionTypeList.java | 81 + .../models/ExtensionTypeVersions.java | 36 + .../models/ExtensionVersionList.java | 96 + .../ExtensionVersionListVersionsItem.java | 77 + .../models/Extensions.java | 220 +++ .../models/ExtensionsClusterResourceName.java | 34 + .../models/ExtensionsClusterRp.java | 34 + .../models/ExtensionsList.java | 62 + .../models/Identity.java | 80 + .../models/LevelType.java | 37 + .../models/LocationExtensionTypes.java | 34 + .../models/OperationStatus.java | 104 ++ .../models/OperationStatusList.java | 59 + .../models/OperationStatusResult.java | 54 + .../models/ProvisioningState.java | 46 + .../models/ResourceIdentityType.java | 44 + .../models/ResourceProviderOperation.java | 8 + .../kubernetesconfiguration/models/Scope.java | 82 + .../models/ScopeCluster.java | 53 + .../models/ScopeNamespace.java | 53 + .../models/SourceControlConfigurations.java | 48 +- ...trolConfigurationsClusterResourceName.java | 36 - .../SourceControlConfigurationsClusterRp.java | 36 - .../models/SupportedScopes.java | 79 + 68 files changed, 7932 insertions(+), 247 deletions(-) create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/ClusterExtensionTypesClient.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/ClusterExtensionTypesOperationsClient.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/ExtensionTypeVersionsClient.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/ExtensionsClient.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/LocationExtensionTypesClient.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/OperationStatusClient.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/ExtensionInner.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/ExtensionTypeInner.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/OperationStatusResultInner.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ClusterExtensionTypesClientImpl.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ClusterExtensionTypesImpl.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ClusterExtensionTypesOperationsClientImpl.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ClusterExtensionTypesOperationsImpl.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ExtensionImpl.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ExtensionTypeImpl.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ExtensionTypeVersionsClientImpl.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ExtensionTypeVersionsImpl.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ExtensionsClientImpl.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ExtensionsImpl.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/LocationExtensionTypesClientImpl.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/LocationExtensionTypesImpl.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/OperationStatusClientImpl.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/OperationStatusImpl.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/OperationStatusResultImpl.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ClusterExtensionTypeClusterType.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ClusterExtensionTypes.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ClusterExtensionTypesOperations.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ClusterScopeSettings.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ClusterTypes.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/Extension.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionStatus.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionType.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionTypeList.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionTypeVersions.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionVersionList.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionVersionListVersionsItem.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/Extensions.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionsClusterResourceName.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionsClusterRp.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionsList.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/Identity.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/LevelType.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/LocationExtensionTypes.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/OperationStatus.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/OperationStatusList.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/OperationStatusResult.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ProvisioningState.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ResourceIdentityType.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/Scope.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ScopeCluster.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ScopeNamespace.java delete mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/SourceControlConfigurationsClusterResourceName.java delete mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/SourceControlConfigurationsClusterRp.java create mode 100644 sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/SupportedScopes.java diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/CHANGELOG.md b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/CHANGELOG.md index a599704b0e40c..f419e0ebcad19 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/CHANGELOG.md +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/CHANGELOG.md @@ -1,7 +1,8 @@ # Release History -## 1.0.0-beta.2 (Unreleased) +## 1.0.0-beta.1 (2021-05-07) +- Azure Resource Manager SourceControlConfiguration client library for Java. This package contains Microsoft Azure SDK for SourceControlConfiguration Management SDK. KubernetesConfiguration Client. Package tag package-preview-2021-05. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## 1.0.0-beta.1 (2021-04-12) diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/README.md b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/README.md index 3552b41be2933..1e2ebff1e0a29 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-2021-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-preview-2021-05. 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.1 + 1.0.0-beta.2 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/pom.xml b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/pom.xml index 7d74fc651672d..de7132dd5931b 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-2021-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-preview-2021-05. 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 efd0a2da188e1..676061b859eb4 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 @@ -21,9 +21,21 @@ import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.kubernetesconfiguration.fluent.SourceControlConfigurationClient; +import com.azure.resourcemanager.kubernetesconfiguration.implementation.ClusterExtensionTypesImpl; +import com.azure.resourcemanager.kubernetesconfiguration.implementation.ClusterExtensionTypesOperationsImpl; +import com.azure.resourcemanager.kubernetesconfiguration.implementation.ExtensionTypeVersionsImpl; +import com.azure.resourcemanager.kubernetesconfiguration.implementation.ExtensionsImpl; +import com.azure.resourcemanager.kubernetesconfiguration.implementation.LocationExtensionTypesImpl; +import com.azure.resourcemanager.kubernetesconfiguration.implementation.OperationStatusImpl; import com.azure.resourcemanager.kubernetesconfiguration.implementation.OperationsImpl; import com.azure.resourcemanager.kubernetesconfiguration.implementation.SourceControlConfigurationClientBuilder; import com.azure.resourcemanager.kubernetesconfiguration.implementation.SourceControlConfigurationsImpl; +import com.azure.resourcemanager.kubernetesconfiguration.models.ClusterExtensionTypes; +import com.azure.resourcemanager.kubernetesconfiguration.models.ClusterExtensionTypesOperations; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionTypeVersions; +import com.azure.resourcemanager.kubernetesconfiguration.models.Extensions; +import com.azure.resourcemanager.kubernetesconfiguration.models.LocationExtensionTypes; +import com.azure.resourcemanager.kubernetesconfiguration.models.OperationStatus; import com.azure.resourcemanager.kubernetesconfiguration.models.Operations; import com.azure.resourcemanager.kubernetesconfiguration.models.SourceControlConfigurations; import java.time.Duration; @@ -34,6 +46,18 @@ /** Entry point to SourceControlConfigurationManager. KubernetesConfiguration Client. */ public final class SourceControlConfigurationManager { + private Extensions extensions; + + private OperationStatus operationStatus; + + private ClusterExtensionTypes clusterExtensionTypes; + + private ClusterExtensionTypesOperations clusterExtensionTypesOperations; + + private ExtensionTypeVersions extensionTypeVersions; + + private LocationExtensionTypes locationExtensionTypes; + private SourceControlConfigurations sourceControlConfigurations; private Operations operations; @@ -203,6 +227,56 @@ public SourceControlConfigurationManager authenticate(TokenCredential credential } } + /** @return Resource collection API of Extensions. */ + public Extensions extensions() { + if (this.extensions == null) { + this.extensions = new ExtensionsImpl(clientObject.getExtensions(), this); + } + return extensions; + } + + /** @return Resource collection API of OperationStatus. */ + public OperationStatus operationStatus() { + if (this.operationStatus == null) { + this.operationStatus = new OperationStatusImpl(clientObject.getOperationStatus(), this); + } + return operationStatus; + } + + /** @return Resource collection API of ClusterExtensionTypes. */ + public ClusterExtensionTypes clusterExtensionTypes() { + if (this.clusterExtensionTypes == null) { + this.clusterExtensionTypes = new ClusterExtensionTypesImpl(clientObject.getClusterExtensionTypes(), this); + } + return clusterExtensionTypes; + } + + /** @return Resource collection API of ClusterExtensionTypesOperations. */ + public ClusterExtensionTypesOperations clusterExtensionTypesOperations() { + if (this.clusterExtensionTypesOperations == null) { + this.clusterExtensionTypesOperations = + new ClusterExtensionTypesOperationsImpl(clientObject.getClusterExtensionTypesOperations(), this); + } + return clusterExtensionTypesOperations; + } + + /** @return Resource collection API of ExtensionTypeVersions. */ + public ExtensionTypeVersions extensionTypeVersions() { + if (this.extensionTypeVersions == null) { + this.extensionTypeVersions = new ExtensionTypeVersionsImpl(clientObject.getExtensionTypeVersions(), this); + } + return extensionTypeVersions; + } + + /** @return Resource collection API of LocationExtensionTypes. */ + public LocationExtensionTypes locationExtensionTypes() { + if (this.locationExtensionTypes == null) { + this.locationExtensionTypes = + new LocationExtensionTypesImpl(clientObject.getLocationExtensionTypes(), this); + } + return locationExtensionTypes; + } + /** @return Resource collection API of SourceControlConfigurations. */ public SourceControlConfigurations sourceControlConfigurations() { if (this.sourceControlConfigurations == null) { diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/ClusterExtensionTypesClient.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/ClusterExtensionTypesClient.java new file mode 100644 index 0000000000000..cab70af44acfd --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/ClusterExtensionTypesClient.java @@ -0,0 +1,64 @@ +// 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.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.ExtensionTypeInner; +import com.azure.resourcemanager.kubernetesconfiguration.models.ClusterExtensionTypeClusterType; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionsClusterRp; + +/** An instance of this class provides access to all the operations defined in ClusterExtensionTypesClient. */ +public interface ClusterExtensionTypesClient { + /** + * Get Extension Type details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterType The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param extensionTypeName Extension type name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return extension Type details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExtensionTypeInner get( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ClusterExtensionTypeClusterType clusterType, + String clusterName, + String extensionTypeName); + + /** + * Get Extension Type details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterType The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param extensionTypeName Extension type name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return extension Type details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ClusterExtensionTypeClusterType clusterType, + String clusterName, + String extensionTypeName, + Context context); +} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/ClusterExtensionTypesOperationsClient.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/ClusterExtensionTypesOperationsClient.java new file mode 100644 index 0000000000000..adec3004845df --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/ClusterExtensionTypesOperationsClient.java @@ -0,0 +1,47 @@ +// 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.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.ExtensionTypeInner; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionsClusterRp; + +/** An instance of this class provides access to all the operations defined in ClusterExtensionTypesOperationsClient. */ +public interface ClusterExtensionTypesOperationsClient { + /** + * Get Extension Types. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return extension Types. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, ExtensionsClusterRp clusterRp, String clusterName); + + /** + * Get Extension Types. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @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 extension Types. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, ExtensionsClusterRp clusterRp, String clusterName, Context context); +} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/ExtensionTypeVersionsClient.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/ExtensionTypeVersionsClient.java new file mode 100644 index 0000000000000..3a45f22e61910 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/ExtensionTypeVersionsClient.java @@ -0,0 +1,41 @@ +// 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.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionVersionListVersionsItem; + +/** An instance of this class provides access to all the operations defined in ExtensionTypeVersionsClient. */ +public interface ExtensionTypeVersionsClient { + /** + * List available versions for an Extension Type. + * + * @param location extension location. + * @param extensionTypeName Extension type name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list versions for an Extension. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location, String extensionTypeName); + + /** + * List available versions for an Extension Type. + * + * @param location extension location. + * @param extensionTypeName Extension type name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list versions for an Extension. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location, String extensionTypeName, Context context); +} 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 new file mode 100644 index 0000000000000..c981ab87066eb --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/ExtensionsClient.java @@ -0,0 +1,339 @@ +// 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.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.ExtensionInner; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionsClusterResourceName; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionsClusterRp; + +/** An instance of this class provides access to all the operations defined in ExtensionsClient. */ +public interface ExtensionsClient { + /** + * Create a new Kubernetes Cluster Extension. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param extensionName Name of the Extension. + * @param extension Properties necessary to Create an 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 the Extension object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, ExtensionInner> beginCreate( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + ExtensionInner extension); + + /** + * Create a new Kubernetes Cluster Extension. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param extensionName Name of the Extension. + * @param extension Properties necessary to Create an 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 the Extension object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, ExtensionInner> beginCreate( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + ExtensionInner extension, + Context context); + + /** + * Create a new Kubernetes Cluster Extension. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param extensionName Name of the Extension. + * @param extension Properties necessary to Create an 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 the Extension object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExtensionInner create( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + ExtensionInner extension); + + /** + * Create a new Kubernetes Cluster Extension. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param extensionName Name of the Extension. + * @param extension Properties necessary to Create an 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 the Extension object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExtensionInner create( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + 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 - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ExtensionInner get( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName); + + /** + * Gets Kubernetes Cluster Extension. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + 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 - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @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 the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginDelete( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + Boolean forceDelete); + + /** + * 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 - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @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. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SyncPoller, Void> beginDelete( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + 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 - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @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, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + Boolean forceDelete); + + /** + * 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 - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName); + + /** + * 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 - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + Boolean forceDelete, + Context context); + + /** + * List all Extensions in the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to list Extensions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName); + + /** + * List all Extensions in the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to list Extensions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + Context context); +} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/LocationExtensionTypesClient.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/LocationExtensionTypesClient.java new file mode 100644 index 0000000000000..036bb85266751 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/LocationExtensionTypesClient.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kubernetesconfiguration.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.ExtensionTypeInner; + +/** An instance of this class provides access to all the operations defined in LocationExtensionTypesClient. */ +public interface LocationExtensionTypesClient { + /** + * List all Extension Types. + * + * @param location extension location. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list Extension Types. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location); + + /** + * List all Extension Types. + * + * @param location extension location. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list Extension Types. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location, Context context); +} 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 new file mode 100644 index 0000000000000..547e3501efaae --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/OperationStatusClient.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kubernetesconfiguration.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionsClusterResourceName; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionsClusterRp; + +/** An instance of this class provides access to all the operations defined in OperationStatusClient. */ +public interface OperationStatusClient { + /** + * List Async Operations, currently in progress, in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the async operations in progress, in the cluster. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName); + + /** + * List Async Operations, currently in progress, in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @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 async operations in progress, in the cluster. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + Context context); + + /** + * Get Async Operation status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param extensionName Name of the Extension. + * @param operationId operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return async Operation status. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + OperationStatusResultInner get( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + String operationId); + + /** + * Get Async Operation status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + String operationId, + Context context); +} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/SourceControlConfigurationClient.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/SourceControlConfigurationClient.java index 659028b4939a1..14940b1f861ca 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/SourceControlConfigurationClient.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/SourceControlConfigurationClient.java @@ -10,7 +10,7 @@ /** The interface for SourceControlConfigurationClient class. */ public interface SourceControlConfigurationClient { /** - * Gets The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + * Gets The ID of the target subscription. * * @return the subscriptionId value. */ @@ -44,6 +44,48 @@ public interface SourceControlConfigurationClient { */ Duration getDefaultPollInterval(); + /** + * Gets the ExtensionsClient object to access its operations. + * + * @return the ExtensionsClient object. + */ + ExtensionsClient getExtensions(); + + /** + * Gets the OperationStatusClient object to access its operations. + * + * @return the OperationStatusClient object. + */ + OperationStatusClient getOperationStatus(); + + /** + * Gets the ClusterExtensionTypesClient object to access its operations. + * + * @return the ClusterExtensionTypesClient object. + */ + ClusterExtensionTypesClient getClusterExtensionTypes(); + + /** + * Gets the ClusterExtensionTypesOperationsClient object to access its operations. + * + * @return the ClusterExtensionTypesOperationsClient object. + */ + ClusterExtensionTypesOperationsClient getClusterExtensionTypesOperations(); + + /** + * Gets the ExtensionTypeVersionsClient object to access its operations. + * + * @return the ExtensionTypeVersionsClient object. + */ + ExtensionTypeVersionsClient getExtensionTypeVersions(); + + /** + * Gets the LocationExtensionTypesClient object to access its operations. + * + * @return the LocationExtensionTypesClient object. + */ + LocationExtensionTypesClient getLocationExtensionTypes(); + /** * Gets the SourceControlConfigurationsClient object to access its operations. * 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 66cfdab965d31..6c1f3fca82596 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 @@ -12,15 +12,15 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.SourceControlConfigurationInner; -import com.azure.resourcemanager.kubernetesconfiguration.models.SourceControlConfigurationsClusterResourceName; -import com.azure.resourcemanager.kubernetesconfiguration.models.SourceControlConfigurationsClusterRp; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionsClusterResourceName; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionsClusterRp; /** An instance of this class provides access to all the operations defined in SourceControlConfigurationsClient. */ public interface SourceControlConfigurationsClient { /** * Gets details of the Source Control Configuration. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -35,15 +35,15 @@ public interface SourceControlConfigurationsClient { @ServiceMethod(returns = ReturnType.SINGLE) SourceControlConfigurationInner get( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName); /** * Gets details of the Source Control Configuration. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -59,8 +59,8 @@ SourceControlConfigurationInner get( @ServiceMethod(returns = ReturnType.SINGLE) Response getWithResponse( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName, Context context); @@ -68,7 +68,7 @@ Response getWithResponse( /** * Create a new Kubernetes Source Control Configuration. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -84,8 +84,8 @@ Response getWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) SourceControlConfigurationInner createOrUpdate( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName, SourceControlConfigurationInner sourceControlConfiguration); @@ -93,7 +93,7 @@ SourceControlConfigurationInner createOrUpdate( /** * Create a new Kubernetes Source Control Configuration. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -110,8 +110,8 @@ SourceControlConfigurationInner createOrUpdate( @ServiceMethod(returns = ReturnType.SINGLE) Response createOrUpdateWithResponse( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName, SourceControlConfigurationInner sourceControlConfiguration, @@ -121,7 +121,7 @@ Response createOrUpdateWithResponse( * This will delete the YAML file used to set up the Source control configuration, thus stopping future sync from * the source repo. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -136,8 +136,8 @@ Response createOrUpdateWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) SyncPoller, Void> beginDelete( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName); @@ -145,7 +145,7 @@ SyncPoller, Void> beginDelete( * This will delete the YAML file used to set up the Source control configuration, thus stopping future sync from * the source repo. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -161,8 +161,8 @@ SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.SINGLE) SyncPoller, Void> beginDelete( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName, Context context); @@ -171,7 +171,7 @@ SyncPoller, Void> beginDelete( * This will delete the YAML file used to set up the Source control configuration, thus stopping future sync from * the source repo. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -185,8 +185,8 @@ SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.SINGLE) void delete( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName); @@ -194,7 +194,7 @@ void delete( * This will delete the YAML file used to set up the Source control configuration, thus stopping future sync from * the source repo. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -209,8 +209,8 @@ void delete( @ServiceMethod(returns = ReturnType.SINGLE) void delete( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName, Context context); @@ -218,7 +218,7 @@ void delete( /** * List all Source Control Configurations. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -232,14 +232,14 @@ void delete( @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName); /** * List all Source Control Configurations. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -254,8 +254,8 @@ PagedIterable list( @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, Context context); } 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 new file mode 100644 index 0000000000000..144be1fe76996 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/ExtensionInner.java @@ -0,0 +1,374 @@ +// 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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionStatus; +import com.azure.resourcemanager.kubernetesconfiguration.models.Identity; +import com.azure.resourcemanager.kubernetesconfiguration.models.ProvisioningState; +import com.azure.resourcemanager.kubernetesconfiguration.models.Scope; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** The Extension object. */ +@JsonFlatten +@Fluent +public class ExtensionInner extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ExtensionInner.class); + + /* + * Identity of the Extension resource + */ + @JsonProperty(value = "identity") + private Identity identity; + + /* + * Top level metadata + * https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /* + * 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 = "properties.extensionType") + private String extensionType; + + /* + * Flag to note if this extension participates in auto upgrade of minor + * version, or not. + */ + @JsonProperty(value = "properties.autoUpgradeMinorVersion") + private Boolean autoUpgradeMinorVersion; + + /* + * ReleaseTrain this extension participates in for auto-upgrade (e.g. + * Stable, Preview, etc.) - only if autoUpgradeMinorVersion is 'true'. + */ + @JsonProperty(value = "properties.releaseTrain") + private String releaseTrain; + + /* + * Version of the extension for this extension, if it is 'pinned' to a + * specific version. autoUpgradeMinorVersion must be 'false'. + */ + @JsonProperty(value = "properties.version") + private String version; + + /* + * Scope at which the extension is installed. + */ + @JsonProperty(value = "properties.scope") + private Scope scope; + + /* + * Configuration settings, as name-value pairs for configuring this + * extension. + */ + @JsonProperty(value = "properties.configurationSettings") + private Map configurationSettings; + + /* + * Configuration settings that are sensitive, as name-value pairs for + * configuring this extension. + */ + @JsonProperty(value = "properties.configurationProtectedSettings") + private Map configurationProtectedSettings; + + /* + * Status of installation of this extension. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * Status from this extension. + */ + @JsonProperty(value = "properties.statuses") + private List statuses; + + /* + * Error information from the Agent - e.g. errors during installation. + */ + @JsonProperty(value = "properties.errorInfo", access = JsonProperty.Access.WRITE_ONLY) + private ManagementError errorInfo; + + /* + * Custom Location settings properties. + */ + @JsonProperty(value = "properties.customLocationSettings", access = JsonProperty.Access.WRITE_ONLY) + private Map customLocationSettings; + + /* + * Uri of the Helm package + */ + @JsonProperty(value = "properties.packageUri", access = JsonProperty.Access.WRITE_ONLY) + private String packageUri; + + /** + * Get the identity property: Identity of the Extension resource. + * + * @return the identity value. + */ + public Identity identity() { + return this.identity; + } + + /** + * Set the identity property: Identity of the Extension resource. + * + * @param identity the identity value to set. + * @return the ExtensionInner object itself. + */ + public ExtensionInner withIdentity(Identity identity) { + this.identity = identity; + return this; + } + + /** + * Get the systemData property: Top level metadata + * https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * 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. + * + * @return the extensionType value. + */ + public String extensionType() { + return this.extensionType; + } + + /** + * Set 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. + * + * @param extensionType the extensionType value to set. + * @return the ExtensionInner object itself. + */ + public ExtensionInner withExtensionType(String extensionType) { + this.extensionType = extensionType; + return this; + } + + /** + * Get the autoUpgradeMinorVersion property: Flag to note if this extension participates in auto upgrade of minor + * version, or not. + * + * @return the autoUpgradeMinorVersion value. + */ + public Boolean autoUpgradeMinorVersion() { + return this.autoUpgradeMinorVersion; + } + + /** + * Set the autoUpgradeMinorVersion property: Flag to note if this extension participates in auto upgrade of minor + * version, or not. + * + * @param autoUpgradeMinorVersion the autoUpgradeMinorVersion value to set. + * @return the ExtensionInner object itself. + */ + public ExtensionInner withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion) { + this.autoUpgradeMinorVersion = autoUpgradeMinorVersion; + return this; + } + + /** + * Get the releaseTrain property: ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, + * Preview, etc.) - only if autoUpgradeMinorVersion is 'true'. + * + * @return the releaseTrain value. + */ + public String releaseTrain() { + return this.releaseTrain; + } + + /** + * Set the releaseTrain property: ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, + * Preview, etc.) - only if autoUpgradeMinorVersion is 'true'. + * + * @param releaseTrain the releaseTrain value to set. + * @return the ExtensionInner object itself. + */ + public ExtensionInner withReleaseTrain(String releaseTrain) { + this.releaseTrain = releaseTrain; + return this; + } + + /** + * Get the version property: Version of the extension for this extension, if it is 'pinned' to a specific version. + * autoUpgradeMinorVersion must be 'false'. + * + * @return the version value. + */ + public String version() { + return this.version; + } + + /** + * Set the version property: Version of the extension for this extension, if it is 'pinned' to a specific version. + * autoUpgradeMinorVersion must be 'false'. + * + * @param version the version value to set. + * @return the ExtensionInner object itself. + */ + public ExtensionInner withVersion(String version) { + this.version = version; + return this; + } + + /** + * Get the scope property: Scope at which the extension is installed. + * + * @return the scope value. + */ + public Scope scope() { + return this.scope; + } + + /** + * Set the scope property: Scope at which the extension is installed. + * + * @param scope the scope value to set. + * @return the ExtensionInner object itself. + */ + public ExtensionInner withScope(Scope scope) { + this.scope = scope; + return this; + } + + /** + * Get the configurationSettings property: Configuration settings, as name-value pairs for configuring this + * extension. + * + * @return the configurationSettings value. + */ + public Map configurationSettings() { + return this.configurationSettings; + } + + /** + * Set the configurationSettings property: Configuration settings, as name-value pairs for configuring this + * extension. + * + * @param configurationSettings the configurationSettings value to set. + * @return the ExtensionInner object itself. + */ + public ExtensionInner withConfigurationSettings(Map configurationSettings) { + this.configurationSettings = configurationSettings; + return this; + } + + /** + * Get the configurationProtectedSettings property: Configuration settings that are sensitive, as name-value pairs + * for configuring this extension. + * + * @return the configurationProtectedSettings value. + */ + public Map configurationProtectedSettings() { + return this.configurationProtectedSettings; + } + + /** + * Set the configurationProtectedSettings property: Configuration settings that are sensitive, as name-value pairs + * for configuring this extension. + * + * @param configurationProtectedSettings the configurationProtectedSettings value to set. + * @return the ExtensionInner object itself. + */ + public ExtensionInner withConfigurationProtectedSettings(Map configurationProtectedSettings) { + this.configurationProtectedSettings = configurationProtectedSettings; + return this; + } + + /** + * Get the provisioningState property: Status of installation of this extension. + * + * @return the provisioningState value. + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the statuses property: Status from this extension. + * + * @return the statuses value. + */ + public List statuses() { + return this.statuses; + } + + /** + * Set the statuses property: Status from this extension. + * + * @param statuses the statuses value to set. + * @return the ExtensionInner object itself. + */ + public ExtensionInner withStatuses(List statuses) { + this.statuses = statuses; + return this; + } + + /** + * Get the errorInfo property: Error information from the Agent - e.g. errors during installation. + * + * @return the errorInfo value. + */ + public ManagementError errorInfo() { + return this.errorInfo; + } + + /** + * Get the customLocationSettings property: Custom Location settings properties. + * + * @return the customLocationSettings value. + */ + public Map customLocationSettings() { + return this.customLocationSettings; + } + + /** + * Get the packageUri property: Uri of the Helm package. + * + * @return the packageUri value. + */ + public String packageUri() { + return this.packageUri; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (scope() != null) { + scope().validate(); + } + if (statuses() != null) { + statuses().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/ExtensionTypeInner.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/ExtensionTypeInner.java new file mode 100644 index 0000000000000..6788c8ee49b30 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/ExtensionTypeInner.java @@ -0,0 +1,93 @@ +// 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.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.JsonFlatten; +import com.azure.core.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.kubernetesconfiguration.models.ClusterTypes; +import com.azure.resourcemanager.kubernetesconfiguration.models.SupportedScopes; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Represents an Extension Type. */ +@JsonFlatten +@Immutable +public class ExtensionTypeInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ExtensionTypeInner.class); + + /* + * Metadata pertaining to creation and last modification of the resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /* + * Extension release train: preview or stable + */ + @JsonProperty(value = "properties.releaseTrains", access = JsonProperty.Access.WRITE_ONLY) + private List releaseTrains; + + /* + * Cluster types + */ + @JsonProperty(value = "properties.clusterTypes", access = JsonProperty.Access.WRITE_ONLY) + private ClusterTypes clusterTypes; + + /* + * Extension scopes + */ + @JsonProperty(value = "properties.supportedScopes", access = JsonProperty.Access.WRITE_ONLY) + private SupportedScopes supportedScopes; + + /** + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the releaseTrains property: Extension release train: preview or stable. + * + * @return the releaseTrains value. + */ + public List releaseTrains() { + return this.releaseTrains; + } + + /** + * Get the clusterTypes property: Cluster types. + * + * @return the clusterTypes value. + */ + public ClusterTypes clusterTypes() { + return this.clusterTypes; + } + + /** + * Get the supportedScopes property: Extension scopes. + * + * @return the supportedScopes value. + */ + public SupportedScopes supportedScopes() { + return this.supportedScopes; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (supportedScopes() != null) { + supportedScopes().validate(); + } + } +} 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 new file mode 100644 index 0000000000000..8c300b4bed834 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/fluent/models/OperationStatusResultInner.java @@ -0,0 +1,151 @@ +// 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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.exception.ManagementError; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The current status of an async operation. */ +@Fluent +public final class OperationStatusResultInner { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationStatusResultInner.class); + + /* + * Fully qualified ID for the async operation. + */ + @JsonProperty(value = "id") + private String id; + + /* + * Name of the async operation. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Operation status. + */ + @JsonProperty(value = "status", required = true) + private String status; + + /* + * Additional information, if available. + */ + @JsonProperty(value = "properties") + private Map properties; + + /* + * If present, details of the operation error. + */ + @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) + private ManagementError error; + + /** + * Get the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Set the id property: Fully qualified ID for the async operation. + * + * @param id the id value to set. + * @return the OperationStatusResultInner object itself. + */ + public OperationStatusResultInner withId(String id) { + this.id = id; + return this; + } + + /** + * Get the name property: Name of the async operation. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the async operation. + * + * @param name the name value to set. + * @return the OperationStatusResultInner object itself. + */ + public OperationStatusResultInner withName(String name) { + this.name = name; + return this; + } + + /** + * Get the status property: Operation status. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Set the status property: Operation status. + * + * @param status the status value to set. + * @return the OperationStatusResultInner object itself. + */ + public OperationStatusResultInner withStatus(String status) { + this.status = status; + return this; + } + + /** + * Get the properties property: Additional information, if available. + * + * @return the properties value. + */ + public Map properties() { + return this.properties; + } + + /** + * Set the properties property: Additional information, if available. + * + * @param properties the properties value to set. + * @return the OperationStatusResultInner object itself. + */ + public OperationStatusResultInner withProperties(Map properties) { + this.properties = properties; + return this; + } + + /** + * Get the error property: If present, details of the operation error. + * + * @return the error value. + */ + public ManagementError error() { + return this.error; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (status() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property status in model OperationStatusResultInner")); + } + } +} 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 bf530e97fea4e..6a28c5ab7d15b 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 @@ -27,6 +27,13 @@ public final class ResourceProviderOperationInner { @JsonProperty(value = "display") private ResourceProviderOperationDisplay display; + /* + * The intended executor of the operation;governs the display of the + * operation in the RBAC UX and the audit logs UX + */ + @JsonProperty(value = "origin") + private String origin; + /* * The flag that indicates whether the operation applies to data plane. */ @@ -73,6 +80,28 @@ public ResourceProviderOperationInner withDisplay(ResourceProviderOperationDispl return this; } + /** + * Get the origin property: The intended executor of the operation;governs the display of the operation in the RBAC + * UX and the audit logs UX. + * + * @return the origin value. + */ + public String origin() { + return this.origin; + } + + /** + * Set the origin property: The intended executor of the operation;governs the display of the operation in the RBAC + * UX and the audit logs UX. + * + * @param origin the origin value to set. + * @return the ResourceProviderOperationInner object itself. + */ + public ResourceProviderOperationInner withOrigin(String origin) { + this.origin = origin; + return this; + } + /** * Get the isDataAction property: The flag that indicates whether the operation applies to data plane. * diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ClusterExtensionTypesClientImpl.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ClusterExtensionTypesClientImpl.java new file mode 100644 index 0000000000000..1eaad34d960b7 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ClusterExtensionTypesClientImpl.java @@ -0,0 +1,303 @@ +// 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.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.ClusterExtensionTypesClient; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.ExtensionTypeInner; +import com.azure.resourcemanager.kubernetesconfiguration.models.ClusterExtensionTypeClusterType; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionsClusterRp; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ClusterExtensionTypesClient. */ +public final class ClusterExtensionTypesClientImpl implements ClusterExtensionTypesClient { + private final ClientLogger logger = new ClientLogger(ClusterExtensionTypesClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final ClusterExtensionTypesService service; + + /** The service client containing this operation class. */ + private final SourceControlConfigurationClientImpl client; + + /** + * Initializes an instance of ClusterExtensionTypesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ClusterExtensionTypesClientImpl(SourceControlConfigurationClientImpl client) { + this.service = + RestProxy + .create(ClusterExtensionTypesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SourceControlConfigurationClientClusterExtensionTypes to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SourceControlConfigu") + private interface ClusterExtensionTypesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterType}" + + "/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensionTypes/{extensionTypeName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("clusterRp") ExtensionsClusterRp clusterRp, + @PathParam("clusterType") ClusterExtensionTypeClusterType clusterType, + @PathParam("clusterName") String clusterName, + @QueryParam("api-version") String apiVersion, + @PathParam("extensionTypeName") String extensionTypeName, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Get Extension Type details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterType The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param extensionTypeName Extension type name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return extension Type details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ClusterExtensionTypeClusterType clusterType, + String clusterName, + String extensionTypeName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterRp == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterRp is required and cannot be null.")); + } + if (clusterType == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterType is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (extensionTypeName == null) { + return Mono + .error(new IllegalArgumentException("Parameter extensionTypeName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterRp, + clusterType, + clusterName, + this.client.getApiVersion(), + extensionTypeName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get Extension Type details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterType The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param extensionTypeName Extension type name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return extension Type details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ClusterExtensionTypeClusterType clusterType, + String clusterName, + String extensionTypeName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterRp == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterRp is required and cannot be null.")); + } + if (clusterType == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterType is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (extensionTypeName == null) { + return Mono + .error(new IllegalArgumentException("Parameter extensionTypeName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterRp, + clusterType, + clusterName, + this.client.getApiVersion(), + extensionTypeName, + accept, + context); + } + + /** + * Get Extension Type details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterType The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param extensionTypeName Extension type name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return extension Type details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ClusterExtensionTypeClusterType clusterType, + String clusterName, + String extensionTypeName) { + return getWithResponseAsync(resourceGroupName, clusterRp, clusterType, clusterName, extensionTypeName) + .flatMap( + (Response res) -> { + if (res.getValue() != null) { + return Mono.just(res.getValue()); + } else { + return Mono.empty(); + } + }); + } + + /** + * Get Extension Type details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterType The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param extensionTypeName Extension type name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return extension Type details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExtensionTypeInner get( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ClusterExtensionTypeClusterType clusterType, + String clusterName, + String extensionTypeName) { + return getAsync(resourceGroupName, clusterRp, clusterType, clusterName, extensionTypeName).block(); + } + + /** + * Get Extension Type details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterType The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param extensionTypeName Extension type name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return extension Type details. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ClusterExtensionTypeClusterType clusterType, + String clusterName, + String extensionTypeName, + Context context) { + return getWithResponseAsync(resourceGroupName, clusterRp, clusterType, clusterName, extensionTypeName, context) + .block(); + } +} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ClusterExtensionTypesImpl.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ClusterExtensionTypesImpl.java new file mode 100644 index 0000000000000..d67a1f7a1aef7 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ClusterExtensionTypesImpl.java @@ -0,0 +1,77 @@ +// 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.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.ClusterExtensionTypesClient; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.ExtensionTypeInner; +import com.azure.resourcemanager.kubernetesconfiguration.models.ClusterExtensionTypeClusterType; +import com.azure.resourcemanager.kubernetesconfiguration.models.ClusterExtensionTypes; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionType; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionsClusterRp; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class ClusterExtensionTypesImpl implements ClusterExtensionTypes { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterExtensionTypesImpl.class); + + private final ClusterExtensionTypesClient innerClient; + + private final com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager serviceManager; + + public ClusterExtensionTypesImpl( + ClusterExtensionTypesClient innerClient, + com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public ExtensionType get( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ClusterExtensionTypeClusterType clusterType, + String clusterName, + String extensionTypeName) { + ExtensionTypeInner inner = + this.serviceClient().get(resourceGroupName, clusterRp, clusterType, clusterName, extensionTypeName); + if (inner != null) { + return new ExtensionTypeImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ClusterExtensionTypeClusterType clusterType, + String clusterName, + String extensionTypeName, + Context context) { + Response inner = + this + .serviceClient() + .getWithResponse(resourceGroupName, clusterRp, clusterType, clusterName, extensionTypeName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ExtensionTypeImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + private ClusterExtensionTypesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ClusterExtensionTypesOperationsClientImpl.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ClusterExtensionTypesOperationsClientImpl.java new file mode 100644 index 0000000000000..4fb0dc6e4a4c8 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ClusterExtensionTypesOperationsClientImpl.java @@ -0,0 +1,366 @@ +// 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.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.ClusterExtensionTypesOperationsClient; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.ExtensionTypeInner; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionTypeList; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionsClusterRp; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ClusterExtensionTypesOperationsClient. */ +public final class ClusterExtensionTypesOperationsClientImpl implements ClusterExtensionTypesOperationsClient { + private final ClientLogger logger = new ClientLogger(ClusterExtensionTypesOperationsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final ClusterExtensionTypesOperationsService service; + + /** The service client containing this operation class. */ + private final SourceControlConfigurationClientImpl client; + + /** + * Initializes an instance of ClusterExtensionTypesOperationsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ClusterExtensionTypesOperationsClientImpl(SourceControlConfigurationClientImpl client) { + this.service = + RestProxy + .create( + ClusterExtensionTypesOperationsService.class, + client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SourceControlConfigurationClientClusterExtensionTypesOperations to be + * used by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SourceControlConfigu") + private interface ClusterExtensionTypesOperationsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/connectedClusters" + + "/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensionTypes") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("clusterRp") ExtensionsClusterRp clusterRp, + @PathParam("clusterName") String clusterName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Get Extension Types. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return extension Types. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, ExtensionsClusterRp clusterRp, String clusterName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterRp == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterRp is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterRp, + clusterName, + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get Extension Types. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @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 extension Types. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, ExtensionsClusterRp clusterRp, String clusterName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterRp == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterRp is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterRp, + clusterName, + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get Extension Types. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return extension Types. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, ExtensionsClusterRp clusterRp, String clusterName) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, clusterRp, clusterName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Get Extension Types. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @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 extension Types. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, ExtensionsClusterRp clusterRp, String clusterName, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, clusterRp, clusterName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Get Extension Types. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return extension Types. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, ExtensionsClusterRp clusterRp, String clusterName) { + return new PagedIterable<>(listAsync(resourceGroupName, clusterRp, clusterName)); + } + + /** + * Get Extension Types. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @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 extension Types. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, ExtensionsClusterRp clusterRp, String clusterName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, clusterRp, clusterName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list Extension Types. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list Extension Types. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ClusterExtensionTypesOperationsImpl.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ClusterExtensionTypesOperationsImpl.java new file mode 100644 index 0000000000000..4aeaf41f3ff2e --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ClusterExtensionTypesOperationsImpl.java @@ -0,0 +1,51 @@ +// 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.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.ClusterExtensionTypesOperationsClient; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.ExtensionTypeInner; +import com.azure.resourcemanager.kubernetesconfiguration.models.ClusterExtensionTypesOperations; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionType; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionsClusterRp; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class ClusterExtensionTypesOperationsImpl implements ClusterExtensionTypesOperations { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterExtensionTypesOperationsImpl.class); + + private final ClusterExtensionTypesOperationsClient innerClient; + + private final com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager serviceManager; + + public ClusterExtensionTypesOperationsImpl( + ClusterExtensionTypesOperationsClient innerClient, + com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list( + String resourceGroupName, ExtensionsClusterRp clusterRp, String clusterName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterRp, clusterName); + return Utils.mapPage(inner, inner1 -> new ExtensionTypeImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, ExtensionsClusterRp clusterRp, String clusterName, Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, clusterRp, clusterName, context); + return Utils.mapPage(inner, inner1 -> new ExtensionTypeImpl(inner1, this.manager())); + } + + private ClusterExtensionTypesOperationsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager manager() { + return this.serviceManager; + } +} 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 new file mode 100644 index 0000000000000..07d8bfacd7b8d --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ExtensionImpl.java @@ -0,0 +1,126 @@ +// 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.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.ExtensionInner; +import com.azure.resourcemanager.kubernetesconfiguration.models.Extension; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionStatus; +import com.azure.resourcemanager.kubernetesconfiguration.models.Identity; +import com.azure.resourcemanager.kubernetesconfiguration.models.ProvisioningState; +import com.azure.resourcemanager.kubernetesconfiguration.models.Scope; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class ExtensionImpl implements Extension { + private ExtensionInner innerObject; + + private final com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager serviceManager; + + ExtensionImpl( + ExtensionInner innerObject, + com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public Identity identity() { + return this.innerModel().identity(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String extensionType() { + return this.innerModel().extensionType(); + } + + public Boolean autoUpgradeMinorVersion() { + return this.innerModel().autoUpgradeMinorVersion(); + } + + public String releaseTrain() { + return this.innerModel().releaseTrain(); + } + + public String version() { + return this.innerModel().version(); + } + + public Scope scope() { + return this.innerModel().scope(); + } + + public Map configurationSettings() { + Map inner = this.innerModel().configurationSettings(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public Map configurationProtectedSettings() { + Map inner = this.innerModel().configurationProtectedSettings(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public List statuses() { + List inner = this.innerModel().statuses(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ManagementError errorInfo() { + return this.innerModel().errorInfo(); + } + + public Map customLocationSettings() { + Map inner = this.innerModel().customLocationSettings(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public String packageUri() { + return this.innerModel().packageUri(); + } + + public ExtensionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ExtensionTypeImpl.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ExtensionTypeImpl.java new file mode 100644 index 0000000000000..15c20fd1ca748 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ExtensionTypeImpl.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kubernetesconfiguration.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.ExtensionTypeInner; +import com.azure.resourcemanager.kubernetesconfiguration.models.ClusterTypes; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionType; +import com.azure.resourcemanager.kubernetesconfiguration.models.SupportedScopes; +import java.util.Collections; +import java.util.List; + +public final class ExtensionTypeImpl implements ExtensionType { + private ExtensionTypeInner innerObject; + + private final com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager serviceManager; + + ExtensionTypeImpl( + ExtensionTypeInner innerObject, + com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public List releaseTrains() { + List inner = this.innerModel().releaseTrains(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public ClusterTypes clusterTypes() { + return this.innerModel().clusterTypes(); + } + + public SupportedScopes supportedScopes() { + return this.innerModel().supportedScopes(); + } + + public ExtensionTypeInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ExtensionTypeVersionsClientImpl.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ExtensionTypeVersionsClientImpl.java new file mode 100644 index 0000000000000..cb36ffe4e2b2d --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ExtensionTypeVersionsClientImpl.java @@ -0,0 +1,339 @@ +// 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.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.ExtensionTypeVersionsClient; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionVersionList; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionVersionListVersionsItem; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ExtensionTypeVersionsClient. */ +public final class ExtensionTypeVersionsClientImpl implements ExtensionTypeVersionsClient { + private final ClientLogger logger = new ClientLogger(ExtensionTypeVersionsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final ExtensionTypeVersionsService service; + + /** The service client containing this operation class. */ + private final SourceControlConfigurationClientImpl client; + + /** + * Initializes an instance of ExtensionTypeVersionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ExtensionTypeVersionsClientImpl(SourceControlConfigurationClientImpl client) { + this.service = + RestProxy + .create(ExtensionTypeVersionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SourceControlConfigurationClientExtensionTypeVersions to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SourceControlConfigu") + private interface ExtensionTypeVersionsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/providers/Microsoft.KubernetesConfiguration/locations/{location}" + + "/extensionTypes/{extensionTypeName}/versions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, + @PathParam("extensionTypeName") String extensionTypeName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List available versions for an Extension Type. + * + * @param location extension location. + * @param extensionTypeName Extension type name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list versions for an Extension. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String location, String extensionTypeName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (extensionTypeName == null) { + return Mono + .error(new IllegalArgumentException("Parameter extensionTypeName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + location, + extensionTypeName, + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().versions(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List available versions for an Extension Type. + * + * @param location extension location. + * @param extensionTypeName Extension type name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list versions for an Extension. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String location, String extensionTypeName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (extensionTypeName == null) { + return Mono + .error(new IllegalArgumentException("Parameter extensionTypeName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + location, + extensionTypeName, + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().versions(), + res.getValue().nextLink(), + null)); + } + + /** + * List available versions for an Extension Type. + * + * @param location extension location. + * @param extensionTypeName Extension type name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list versions for an Extension. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String location, String extensionTypeName) { + return new PagedFlux<>( + () -> listSinglePageAsync(location, extensionTypeName), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List available versions for an Extension Type. + * + * @param location extension location. + * @param extensionTypeName Extension type name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list versions for an Extension. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String location, String extensionTypeName, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(location, extensionTypeName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List available versions for an Extension Type. + * + * @param location extension location. + * @param extensionTypeName Extension type name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list versions for an Extension. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String location, String extensionTypeName) { + return new PagedIterable<>(listAsync(location, extensionTypeName)); + } + + /** + * List available versions for an Extension Type. + * + * @param location extension location. + * @param extensionTypeName Extension type name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list versions for an Extension. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String location, String extensionTypeName, Context context) { + return new PagedIterable<>(listAsync(location, extensionTypeName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list versions for an Extension. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().versions(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list versions for an Extension. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().versions(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ExtensionTypeVersionsImpl.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ExtensionTypeVersionsImpl.java new file mode 100644 index 0000000000000..d8b7f935d23b5 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ExtensionTypeVersionsImpl.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kubernetesconfiguration.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.ExtensionTypeVersionsClient; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionTypeVersions; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionVersionListVersionsItem; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class ExtensionTypeVersionsImpl implements ExtensionTypeVersions { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ExtensionTypeVersionsImpl.class); + + private final ExtensionTypeVersionsClient innerClient; + + private final com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager serviceManager; + + public ExtensionTypeVersionsImpl( + ExtensionTypeVersionsClient innerClient, + com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String location, String extensionTypeName) { + return this.serviceClient().list(location, extensionTypeName); + } + + public PagedIterable list( + String location, String extensionTypeName, Context context) { + return this.serviceClient().list(location, extensionTypeName, context); + } + + private ExtensionTypeVersionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager manager() { + return this.serviceManager; + } +} 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 new file mode 100644 index 0000000000000..f22fd69d76839 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ExtensionsClientImpl.java @@ -0,0 +1,1548 @@ +// 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.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.ExtensionsClient; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.ExtensionInner; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionsClusterResourceName; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionsClusterRp; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionsList; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ExtensionsClient. */ +public final class ExtensionsClientImpl implements ExtensionsClient { + private final ClientLogger logger = new ClientLogger(ExtensionsClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final ExtensionsService service; + + /** The service client containing this operation class. */ + private final SourceControlConfigurationClientImpl client; + + /** + * Initializes an instance of ExtensionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ExtensionsClientImpl(SourceControlConfigurationClientImpl client) { + this.service = + RestProxy.create(ExtensionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SourceControlConfigurationClientExtensions to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SourceControlConfigu") + private interface ExtensionsService { + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}" + + "/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions" + + "/{extensionName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> create( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("clusterRp") ExtensionsClusterRp clusterRp, + @PathParam("clusterResourceName") ExtensionsClusterResourceName clusterResourceName, + @PathParam("clusterName") String clusterName, + @PathParam("extensionName") String extensionName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ExtensionInner extension, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}" + + "/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions" + + "/{extensionName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("clusterRp") ExtensionsClusterRp clusterRp, + @PathParam("clusterResourceName") ExtensionsClusterResourceName clusterResourceName, + @PathParam("clusterName") String clusterName, + @PathParam("extensionName") String extensionName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}" + + "/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions" + + "/{extensionName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("clusterRp") ExtensionsClusterRp clusterRp, + @PathParam("clusterResourceName") ExtensionsClusterResourceName clusterResourceName, + @PathParam("clusterName") String clusterName, + @PathParam("extensionName") String extensionName, + @QueryParam("api-version") String apiVersion, + @QueryParam("forceDelete") Boolean forceDelete, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}" + + "/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("clusterRp") ExtensionsClusterRp clusterRp, + @PathParam("clusterResourceName") ExtensionsClusterResourceName clusterResourceName, + @PathParam("clusterName") String clusterName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Create a new Kubernetes Cluster Extension. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param extensionName Name of the Extension. + * @param extension Properties necessary to Create an 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 Extension object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + ExtensionInner extension) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterRp == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterRp is required and cannot be null.")); + } + if (clusterResourceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter clusterResourceName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (extensionName == null) { + return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); + } + if (extension == null) { + return Mono.error(new IllegalArgumentException("Parameter extension is required and cannot be null.")); + } else { + extension.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .create( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterRp, + clusterResourceName, + clusterName, + extensionName, + this.client.getApiVersion(), + extension, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a new Kubernetes Cluster Extension. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param extensionName Name of the Extension. + * @param extension Properties necessary to Create an 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 the Extension object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createWithResponseAsync( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + ExtensionInner extension, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterRp == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterRp is required and cannot be null.")); + } + if (clusterResourceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter clusterResourceName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (extensionName == null) { + return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); + } + if (extension == null) { + return Mono.error(new IllegalArgumentException("Parameter extension is required and cannot be null.")); + } else { + extension.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .create( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterRp, + clusterResourceName, + clusterName, + extensionName, + this.client.getApiVersion(), + extension, + accept, + context); + } + + /** + * Create a new Kubernetes Cluster Extension. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param extensionName Name of the Extension. + * @param extension Properties necessary to Create an 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 Extension object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, ExtensionInner> beginCreateAsync( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + ExtensionInner extension) { + Mono>> mono = + createWithResponseAsync( + resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, extension); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), ExtensionInner.class, ExtensionInner.class, Context.NONE); + } + + /** + * Create a new Kubernetes Cluster Extension. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param extensionName Name of the Extension. + * @param extension Properties necessary to Create an 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 the Extension object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, ExtensionInner> beginCreateAsync( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + ExtensionInner extension, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createWithResponseAsync( + resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, extension, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), ExtensionInner.class, ExtensionInner.class, context); + } + + /** + * Create a new Kubernetes Cluster Extension. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param extensionName Name of the Extension. + * @param extension Properties necessary to Create an 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 Extension object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, ExtensionInner> beginCreate( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + ExtensionInner extension) { + return beginCreateAsync( + resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, extension) + .getSyncPoller(); + } + + /** + * Create a new Kubernetes Cluster Extension. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param extensionName Name of the Extension. + * @param extension Properties necessary to Create an 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 the Extension object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, ExtensionInner> beginCreate( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + ExtensionInner extension, + Context context) { + return beginCreateAsync( + resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, extension, context) + .getSyncPoller(); + } + + /** + * Create a new Kubernetes Cluster Extension. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param extensionName Name of the Extension. + * @param extension Properties necessary to Create an 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 Extension object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + ExtensionInner extension) { + return beginCreateAsync( + resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, extension) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a new Kubernetes Cluster Extension. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param extensionName Name of the Extension. + * @param extension Properties necessary to Create an 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 the Extension object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createAsync( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + ExtensionInner extension, + Context context) { + return beginCreateAsync( + resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, extension, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a new Kubernetes Cluster Extension. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param extensionName Name of the Extension. + * @param extension Properties necessary to Create an 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 Extension object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExtensionInner create( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + ExtensionInner extension) { + return createAsync(resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, extension) + .block(); + } + + /** + * Create a new Kubernetes Cluster Extension. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param extensionName Name of the Extension. + * @param extension Properties necessary to Create an 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 the Extension object. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExtensionInner create( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + ExtensionInner extension, + Context context) { + return createAsync( + resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, extension, context) + .block(); + } + + /** + * Gets Kubernetes Cluster Extension. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @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 kubernetes Cluster Extension. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterRp == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterRp is required and cannot be null.")); + } + if (clusterResourceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter clusterResourceName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (extensionName == null) { + return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterRp, + clusterResourceName, + clusterName, + extensionName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets Kubernetes Cluster Extension. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterRp == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterRp is required and cannot be null.")); + } + if (clusterResourceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter clusterResourceName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (extensionName == null) { + return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterRp, + clusterResourceName, + clusterName, + extensionName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Gets Kubernetes Cluster Extension. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @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 kubernetes Cluster Extension. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + 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(); + } + }); + } + + /** + * Gets Kubernetes Cluster Extension. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @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 kubernetes Cluster Extension. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ExtensionInner get( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName) { + return getAsync(resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName).block(); + } + + /** + * Gets Kubernetes Cluster Extension. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + Context context) { + return getWithResponseAsync( + resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, context) + .block(); + } + + /** + * 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 - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @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. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + Boolean forceDelete) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterRp == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterRp is required and cannot be null.")); + } + if (clusterResourceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter clusterResourceName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (extensionName == null) { + return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterRp, + clusterResourceName, + clusterName, + extensionName, + this.client.getApiVersion(), + forceDelete, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * 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 - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @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. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + Boolean forceDelete, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterRp == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterRp is required and cannot be null.")); + } + if (clusterResourceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter clusterResourceName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (extensionName == null) { + return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterRp, + clusterResourceName, + clusterName, + extensionName, + this.client.getApiVersion(), + forceDelete, + accept, + 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 - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @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. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + Boolean forceDelete) { + Mono>> mono = + deleteWithResponseAsync( + resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, forceDelete); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE); + } + + /** + * 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 - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @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. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private PollerFlux, Void> beginDeleteAsync( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + Boolean forceDelete, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync( + resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, forceDelete, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, 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 - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @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. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDelete( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + Boolean forceDelete) { + return beginDeleteAsync( + resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, forceDelete) + .getSyncPoller(); + } + + /** + * 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 - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @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. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SyncPoller, Void> beginDelete( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + Boolean forceDelete, + Context context) { + return beginDeleteAsync( + resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, forceDelete, context) + .getSyncPoller(); + } + + /** + * 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 - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @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. + * @return the completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + Boolean forceDelete) { + return beginDeleteAsync( + resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, forceDelete) + .last() + .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 - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName) { + final Boolean forceDelete = null; + return beginDeleteAsync( + resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, forceDelete) + .last() + .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 - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @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. + * @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 completion. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + Boolean forceDelete, + Context context) { + return beginDeleteAsync( + resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, forceDelete, context) + .last() + .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 - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @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, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName 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. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName) { + final Boolean forceDelete = null; + 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. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + Boolean forceDelete, + Context context) { + deleteAsync(resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, forceDelete, context) + .block(); + } + + /** + * List all Extensions in the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to list Extensions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterRp == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterRp is required and cannot be null.")); + } + if (clusterResourceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter clusterResourceName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterRp, + clusterResourceName, + clusterName, + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all Extensions in the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to list Extensions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterRp == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterRp is required and cannot be null.")); + } + if (clusterResourceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter clusterResourceName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterRp, + clusterResourceName, + clusterName, + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List all Extensions in the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to list Extensions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, clusterRp, clusterResourceName, clusterName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List all Extensions in the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to list Extensions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, clusterRp, clusterResourceName, clusterName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List all Extensions in the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to list Extensions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName) { + return new PagedIterable<>(listAsync(resourceGroupName, clusterRp, clusterResourceName, clusterName)); + } + + /** + * List all Extensions in the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to list Extensions. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, clusterRp, clusterResourceName, clusterName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to list Extensions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to list Extensions. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/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 new file mode 100644 index 0000000000000..118e9a488867d --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ExtensionsImpl.java @@ -0,0 +1,173 @@ +// 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.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.ExtensionsClient; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.ExtensionInner; +import com.azure.resourcemanager.kubernetesconfiguration.models.Extension; +import com.azure.resourcemanager.kubernetesconfiguration.models.Extensions; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionsClusterResourceName; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionsClusterRp; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class ExtensionsImpl implements Extensions { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ExtensionsImpl.class); + + private final ExtensionsClient innerClient; + + private final com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager serviceManager; + + public ExtensionsImpl( + ExtensionsClient innerClient, + com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Extension create( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + ExtensionInner extension) { + ExtensionInner inner = + this + .serviceClient() + .create(resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, extension); + if (inner != null) { + return new ExtensionImpl(inner, this.manager()); + } else { + return null; + } + } + + public Extension create( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + ExtensionInner extension, + Context context) { + ExtensionInner inner = + this + .serviceClient() + .create( + resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, extension, context); + if (inner != null) { + return new ExtensionImpl(inner, this.manager()); + } else { + return null; + } + } + + public Extension get( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName 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, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + Context context) { + Response inner = + this + .serviceClient() + .getWithResponse( + resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new ExtensionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void delete( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + Boolean forceDelete) { + this + .serviceClient() + .delete(resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, forceDelete); + } + + public void delete( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName) { + this.serviceClient().delete(resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName); + } + + public void delete( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + Boolean forceDelete, + Context context) { + this + .serviceClient() + .delete( + resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, forceDelete, context); + } + + public PagedIterable list( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, clusterRp, clusterResourceName, clusterName); + return Utils.mapPage(inner, inner1 -> new ExtensionImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, clusterRp, clusterResourceName, clusterName, context); + return Utils.mapPage(inner, inner1 -> new ExtensionImpl(inner1, this.manager())); + } + + private ExtensionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/LocationExtensionTypesClientImpl.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/LocationExtensionTypesClientImpl.java new file mode 100644 index 0000000000000..97e4b6747a552 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/LocationExtensionTypesClientImpl.java @@ -0,0 +1,315 @@ +// 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.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.LocationExtensionTypesClient; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.ExtensionTypeInner; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionTypeList; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in LocationExtensionTypesClient. */ +public final class LocationExtensionTypesClientImpl implements LocationExtensionTypesClient { + private final ClientLogger logger = new ClientLogger(LocationExtensionTypesClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final LocationExtensionTypesService service; + + /** The service client containing this operation class. */ + private final SourceControlConfigurationClientImpl client; + + /** + * Initializes an instance of LocationExtensionTypesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + LocationExtensionTypesClientImpl(SourceControlConfigurationClientImpl client) { + this.service = + RestProxy + .create(LocationExtensionTypesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SourceControlConfigurationClientLocationExtensionTypes to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SourceControlConfigu") + private interface LocationExtensionTypesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/providers/Microsoft.KubernetesConfiguration/locations/{location}" + + "/extensionTypes") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List all Extension Types. + * + * @param location extension location. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list Extension Types. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + location, + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List all Extension Types. + * + * @param location extension location. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list Extension Types. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String location, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + location, + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List all Extension Types. + * + * @param location extension location. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list Extension Types. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String location) { + return new PagedFlux<>(() -> listSinglePageAsync(location), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List all Extension Types. + * + * @param location extension location. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list Extension Types. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String location, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(location, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List all Extension Types. + * + * @param location extension location. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list Extension Types. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String location) { + return new PagedIterable<>(listAsync(location)); + } + + /** + * List all Extension Types. + * + * @param location extension location. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list Extension Types. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String location, Context context) { + return new PagedIterable<>(listAsync(location, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list Extension Types. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list Extension Types. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/LocationExtensionTypesImpl.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/LocationExtensionTypesImpl.java new file mode 100644 index 0000000000000..512cf54a38e85 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/LocationExtensionTypesImpl.java @@ -0,0 +1,47 @@ +// 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.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.LocationExtensionTypesClient; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.ExtensionTypeInner; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionType; +import com.azure.resourcemanager.kubernetesconfiguration.models.LocationExtensionTypes; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class LocationExtensionTypesImpl implements LocationExtensionTypes { + @JsonIgnore private final ClientLogger logger = new ClientLogger(LocationExtensionTypesImpl.class); + + private final LocationExtensionTypesClient innerClient; + + private final com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager serviceManager; + + public LocationExtensionTypesImpl( + LocationExtensionTypesClient innerClient, + com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String location) { + PagedIterable inner = this.serviceClient().list(location); + return Utils.mapPage(inner, inner1 -> new ExtensionTypeImpl(inner1, this.manager())); + } + + public PagedIterable list(String location, Context context) { + PagedIterable inner = this.serviceClient().list(location, context); + return Utils.mapPage(inner, inner1 -> new ExtensionTypeImpl(inner1, this.manager())); + } + + private LocationExtensionTypesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager manager() { + return this.serviceManager; + } +} 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 new file mode 100644 index 0000000000000..977596e05e518 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/OperationStatusClientImpl.java @@ -0,0 +1,673 @@ +// 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.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.OperationStatusClient; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionsClusterResourceName; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionsClusterRp; +import com.azure.resourcemanager.kubernetesconfiguration.models.OperationStatusList; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in OperationStatusClient. */ +public final class OperationStatusClientImpl implements OperationStatusClient { + private final ClientLogger logger = new ClientLogger(OperationStatusClientImpl.class); + + /** The proxy service used to perform REST calls. */ + private final OperationStatusService service; + + /** The service client containing this operation class. */ + private final SourceControlConfigurationClientImpl client; + + /** + * Initializes an instance of OperationStatusClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + OperationStatusClientImpl(SourceControlConfigurationClientImpl client) { + this.service = + RestProxy.create(OperationStatusService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for SourceControlConfigurationClientOperationStatus to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "SourceControlConfigu") + private interface OperationStatusService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}" + + "/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/operations") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("clusterRp") ExtensionsClusterRp clusterRp, + @PathParam("clusterResourceName") ExtensionsClusterResourceName clusterResourceName, + @PathParam("clusterName") String clusterName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}" + + "/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/extensions" + + "/{extensionName}/operations/{operationId}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("clusterRp") ExtensionsClusterRp clusterRp, + @PathParam("clusterResourceName") ExtensionsClusterResourceName clusterResourceName, + @PathParam("clusterName") String clusterName, + @PathParam("extensionName") String extensionName, + @QueryParam("api-version") String apiVersion, + @PathParam("operationId") String operationId, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List Async Operations, currently in progress, in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the async operations in progress, in the cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterRp == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterRp is required and cannot be null.")); + } + if (clusterResourceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter clusterResourceName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterRp, + clusterResourceName, + clusterName, + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Async Operations, currently in progress, in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @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 async operations in progress, in the cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterRp == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterRp is required and cannot be null.")); + } + if (clusterResourceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter clusterResourceName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterRp, + clusterResourceName, + clusterName, + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List Async Operations, currently in progress, in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the async operations in progress, in the cluster. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, clusterRp, clusterResourceName, clusterName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List Async Operations, currently in progress, in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @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 async operations in progress, in the cluster. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, clusterRp, clusterResourceName, clusterName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List Async Operations, currently in progress, in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the async operations in progress, in the cluster. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName) { + return new PagedIterable<>(listAsync(resourceGroupName, clusterRp, clusterResourceName, clusterName)); + } + + /** + * List Async Operations, currently in progress, in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @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 async operations in progress, in the cluster. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, clusterRp, clusterResourceName, clusterName, context)); + } + + /** + * Get Async Operation status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param extensionName Name of the Extension. + * @param operationId operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + String operationId) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterRp == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterRp is required and cannot be null.")); + } + if (clusterResourceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter clusterResourceName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (extensionName == null) { + return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterRp, + clusterResourceName, + clusterName, + extensionName, + this.client.getApiVersion(), + operationId, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get Async Operation status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + String operationId, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (clusterRp == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterRp is required and cannot be null.")); + } + if (clusterResourceName == null) { + return Mono + .error(new IllegalArgumentException("Parameter clusterResourceName is required and cannot be null.")); + } + if (clusterName == null) { + return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null.")); + } + if (extensionName == null) { + return Mono.error(new IllegalArgumentException("Parameter extensionName is required and cannot be null.")); + } + if (operationId == null) { + return Mono.error(new IllegalArgumentException("Parameter operationId is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .get( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + clusterRp, + clusterResourceName, + clusterName, + extensionName, + this.client.getApiVersion(), + operationId, + accept, + context); + } + + /** + * Get Async Operation status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param extensionName Name of the Extension. + * @param operationId operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + 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(); + } + }); + } + + /** + * Get Async Operation status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param extensionName Name of the Extension. + * @param operationId operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public OperationStatusResultInner get( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + String operationId) { + return getAsync(resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, operationId) + .block(); + } + + /** + * Get Async Operation status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + String operationId, + Context context) { + return getWithResponseAsync( + resourceGroupName, clusterRp, clusterResourceName, clusterName, extensionName, operationId, context) + .block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the async operations in progress, in the cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the async operations in progress, in the cluster. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/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 new file mode 100644 index 0000000000000..37f7c91c079c8 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/OperationStatusImpl.java @@ -0,0 +1,110 @@ +// 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.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.OperationStatusClient; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionsClusterResourceName; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionsClusterRp; +import com.azure.resourcemanager.kubernetesconfiguration.models.OperationStatus; +import com.azure.resourcemanager.kubernetesconfiguration.models.OperationStatusResult; +import com.fasterxml.jackson.annotation.JsonIgnore; + +public final class OperationStatusImpl implements OperationStatus { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationStatusImpl.class); + + private final OperationStatusClient innerClient; + + private final com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager serviceManager; + + public OperationStatusImpl( + OperationStatusClient innerClient, + com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, clusterRp, clusterResourceName, clusterName); + return Utils.mapPage(inner, inner1 -> new OperationStatusResultImpl(inner1, this.manager())); + } + + public PagedIterable list( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + Context context) { + PagedIterable inner = + this.serviceClient().list(resourceGroupName, clusterRp, clusterResourceName, clusterName, context); + return Utils.mapPage(inner, inner1 -> new OperationStatusResultImpl(inner1, this.manager())); + } + + public OperationStatusResult get( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName 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, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + String operationId, + Context context) { + Response inner = + this + .serviceClient() + .getWithResponse( + resourceGroupName, + clusterRp, + clusterResourceName, + clusterName, + extensionName, + operationId, + context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new OperationStatusResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + private OperationStatusClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/OperationStatusResultImpl.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/OperationStatusResultImpl.java new file mode 100644 index 0000000000000..12248f4c2cb77 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/OperationStatusResultImpl.java @@ -0,0 +1,57 @@ +// 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.implementation; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.OperationStatusResultInner; +import com.azure.resourcemanager.kubernetesconfiguration.models.OperationStatusResult; +import java.util.Collections; +import java.util.Map; + +public final class OperationStatusResultImpl implements OperationStatusResult { + private OperationStatusResultInner innerObject; + + private final com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager serviceManager; + + OperationStatusResultImpl( + OperationStatusResultInner innerObject, + com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String status() { + return this.innerModel().status(); + } + + public Map properties() { + Map inner = this.innerModel().properties(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ManagementError error() { + return this.innerModel().error(); + } + + public OperationStatusResultInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.kubernetesconfiguration.SourceControlConfigurationManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ResourceProviderOperationImpl.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ResourceProviderOperationImpl.java index c635d1f7e0299..94d99ccf6f124 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ResourceProviderOperationImpl.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/implementation/ResourceProviderOperationImpl.java @@ -28,6 +28,10 @@ public ResourceProviderOperationDisplay display() { return this.innerModel().display(); } + public String origin() { + return this.innerModel().origin(); + } + public Boolean isDataAction() { return this.innerModel().isDataAction(); } 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 d98393f02fef3..752d006aea87a 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 @@ -19,13 +19,12 @@ @ServiceClientBuilder(serviceClients = {SourceControlConfigurationClientImpl.class}) public final class SourceControlConfigurationClientBuilder { /* - * The Azure subscription ID. This is a GUID-formatted string (e.g. - * 00000000-0000-0000-0000-000000000000) + * The ID of the target subscription. */ private String subscriptionId; /** - * Sets The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + * Sets The ID of the target subscription. * * @param subscriptionId the subscriptionId value. * @return the SourceControlConfigurationClientBuilder. 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 0ca2fdb4a8873..6c89492dda516 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 @@ -21,6 +21,12 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.ClusterExtensionTypesClient; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.ClusterExtensionTypesOperationsClient; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.ExtensionTypeVersionsClient; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.ExtensionsClient; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.LocationExtensionTypesClient; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.OperationStatusClient; import com.azure.resourcemanager.kubernetesconfiguration.fluent.OperationsClient; import com.azure.resourcemanager.kubernetesconfiguration.fluent.SourceControlConfigurationClient; import com.azure.resourcemanager.kubernetesconfiguration.fluent.SourceControlConfigurationsClient; @@ -39,11 +45,11 @@ public final class SourceControlConfigurationClientImpl implements SourceControlConfigurationClient { private final ClientLogger logger = new ClientLogger(SourceControlConfigurationClientImpl.class); - /** The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). */ + /** The ID of the target subscription. */ private final String subscriptionId; /** - * Gets The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000). + * Gets The ID of the target subscription. * * @return the subscriptionId value. */ @@ -111,6 +117,78 @@ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } + /** The ExtensionsClient object to access its operations. */ + private final ExtensionsClient extensions; + + /** + * Gets the ExtensionsClient object to access its operations. + * + * @return the ExtensionsClient object. + */ + public ExtensionsClient getExtensions() { + return this.extensions; + } + + /** The OperationStatusClient object to access its operations. */ + private final OperationStatusClient operationStatus; + + /** + * Gets the OperationStatusClient object to access its operations. + * + * @return the OperationStatusClient object. + */ + public OperationStatusClient getOperationStatus() { + return this.operationStatus; + } + + /** The ClusterExtensionTypesClient object to access its operations. */ + private final ClusterExtensionTypesClient clusterExtensionTypes; + + /** + * Gets the ClusterExtensionTypesClient object to access its operations. + * + * @return the ClusterExtensionTypesClient object. + */ + public ClusterExtensionTypesClient getClusterExtensionTypes() { + return this.clusterExtensionTypes; + } + + /** The ClusterExtensionTypesOperationsClient object to access its operations. */ + private final ClusterExtensionTypesOperationsClient clusterExtensionTypesOperations; + + /** + * Gets the ClusterExtensionTypesOperationsClient object to access its operations. + * + * @return the ClusterExtensionTypesOperationsClient object. + */ + public ClusterExtensionTypesOperationsClient getClusterExtensionTypesOperations() { + return this.clusterExtensionTypesOperations; + } + + /** The ExtensionTypeVersionsClient object to access its operations. */ + private final ExtensionTypeVersionsClient extensionTypeVersions; + + /** + * Gets the ExtensionTypeVersionsClient object to access its operations. + * + * @return the ExtensionTypeVersionsClient object. + */ + public ExtensionTypeVersionsClient getExtensionTypeVersions() { + return this.extensionTypeVersions; + } + + /** The LocationExtensionTypesClient object to access its operations. */ + private final LocationExtensionTypesClient locationExtensionTypes; + + /** + * Gets the LocationExtensionTypesClient object to access its operations. + * + * @return the LocationExtensionTypesClient object. + */ + public LocationExtensionTypesClient getLocationExtensionTypes() { + return this.locationExtensionTypes; + } + /** The SourceControlConfigurationsClient object to access its operations. */ private final SourceControlConfigurationsClient sourceControlConfigurations; @@ -142,8 +220,7 @@ public OperationsClient getOperations() { * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. - * @param subscriptionId The Azure subscription ID. This is a GUID-formatted string (e.g. - * 00000000-0000-0000-0000-000000000000). + * @param subscriptionId The ID of the target subscription. * @param endpoint server parameter. */ SourceControlConfigurationClientImpl( @@ -158,7 +235,13 @@ public OperationsClient getOperations() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2021-03-01"; + this.apiVersion = "2021-05-01-preview"; + this.extensions = new ExtensionsClientImpl(this); + this.operationStatus = new OperationStatusClientImpl(this); + this.clusterExtensionTypes = new ClusterExtensionTypesClientImpl(this); + this.clusterExtensionTypesOperations = new ClusterExtensionTypesOperationsClientImpl(this); + this.extensionTypeVersions = new ExtensionTypeVersionsClientImpl(this); + this.locationExtensionTypes = new LocationExtensionTypesClientImpl(this); this.sourceControlConfigurations = new SourceControlConfigurationsClientImpl(this); this.operations = new OperationsClientImpl(this); } 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 517ed2c74f3e6..d2aecef161e59 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 @@ -34,9 +34,9 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.kubernetesconfiguration.fluent.SourceControlConfigurationsClient; import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.SourceControlConfigurationInner; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionsClusterResourceName; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionsClusterRp; import com.azure.resourcemanager.kubernetesconfiguration.models.SourceControlConfigurationList; -import com.azure.resourcemanager.kubernetesconfiguration.models.SourceControlConfigurationsClusterResourceName; -import com.azure.resourcemanager.kubernetesconfiguration.models.SourceControlConfigurationsClusterRp; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -82,8 +82,8 @@ Mono> get( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterRp") SourceControlConfigurationsClusterRp clusterRp, - @PathParam("clusterResourceName") SourceControlConfigurationsClusterResourceName clusterResourceName, + @PathParam("clusterRp") ExtensionsClusterRp clusterRp, + @PathParam("clusterResourceName") ExtensionsClusterResourceName clusterResourceName, @PathParam("clusterName") String clusterName, @PathParam("sourceControlConfigurationName") String sourceControlConfigurationName, @QueryParam("api-version") String apiVersion, @@ -101,8 +101,8 @@ Mono> createOrUpdate( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterRp") SourceControlConfigurationsClusterRp clusterRp, - @PathParam("clusterResourceName") SourceControlConfigurationsClusterResourceName clusterResourceName, + @PathParam("clusterRp") ExtensionsClusterRp clusterRp, + @PathParam("clusterResourceName") ExtensionsClusterResourceName clusterResourceName, @PathParam("clusterName") String clusterName, @PathParam("sourceControlConfigurationName") String sourceControlConfigurationName, @QueryParam("api-version") String apiVersion, @@ -121,8 +121,8 @@ Mono>> delete( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterRp") SourceControlConfigurationsClusterRp clusterRp, - @PathParam("clusterResourceName") SourceControlConfigurationsClusterResourceName clusterResourceName, + @PathParam("clusterRp") ExtensionsClusterRp clusterRp, + @PathParam("clusterResourceName") ExtensionsClusterResourceName clusterResourceName, @PathParam("clusterName") String clusterName, @PathParam("sourceControlConfigurationName") String sourceControlConfigurationName, @QueryParam("api-version") String apiVersion, @@ -140,8 +140,8 @@ Mono> list( @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("clusterRp") SourceControlConfigurationsClusterRp clusterRp, - @PathParam("clusterResourceName") SourceControlConfigurationsClusterResourceName clusterResourceName, + @PathParam("clusterRp") ExtensionsClusterRp clusterRp, + @PathParam("clusterResourceName") ExtensionsClusterResourceName clusterResourceName, @PathParam("clusterName") String clusterName, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, @@ -161,7 +161,7 @@ Mono> listNext( /** * Gets details of the Source Control Configuration. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -176,8 +176,8 @@ Mono> listNext( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName) { if (this.client.getEndpoint() == null) { @@ -234,7 +234,7 @@ private Mono> getWithResponseAsync( /** * Gets details of the Source Control Configuration. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -250,8 +250,8 @@ private Mono> getWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName, Context context) { @@ -306,7 +306,7 @@ private Mono> getWithResponseAsync( /** * Gets details of the Source Control Configuration. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -321,8 +321,8 @@ private Mono> getWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName) { return getWithResponseAsync( @@ -340,7 +340,7 @@ private Mono getAsync( /** * Gets details of the Source Control Configuration. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -355,8 +355,8 @@ private Mono getAsync( @ServiceMethod(returns = ReturnType.SINGLE) public SourceControlConfigurationInner get( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName) { return getAsync(resourceGroupName, clusterRp, clusterResourceName, clusterName, sourceControlConfigurationName) @@ -366,7 +366,7 @@ public SourceControlConfigurationInner get( /** * Gets details of the Source Control Configuration. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -382,8 +382,8 @@ public SourceControlConfigurationInner get( @ServiceMethod(returns = ReturnType.SINGLE) public Response getWithResponse( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName, Context context) { @@ -395,7 +395,7 @@ public Response getWithResponse( /** * Create a new Kubernetes Source Control Configuration. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -411,8 +411,8 @@ public Response getWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName, SourceControlConfigurationInner sourceControlConfiguration) { @@ -479,7 +479,7 @@ private Mono> createOrUpdateWithRespon /** * Create a new Kubernetes Source Control Configuration. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -496,8 +496,8 @@ private Mono> createOrUpdateWithRespon @ServiceMethod(returns = ReturnType.SINGLE) private Mono> createOrUpdateWithResponseAsync( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName, SourceControlConfigurationInner sourceControlConfiguration, @@ -562,7 +562,7 @@ private Mono> createOrUpdateWithRespon /** * Create a new Kubernetes Source Control Configuration. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -578,8 +578,8 @@ private Mono> createOrUpdateWithRespon @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName, SourceControlConfigurationInner sourceControlConfiguration) { @@ -603,7 +603,7 @@ private Mono createOrUpdateAsync( /** * Create a new Kubernetes Source Control Configuration. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -619,8 +619,8 @@ private Mono createOrUpdateAsync( @ServiceMethod(returns = ReturnType.SINGLE) public SourceControlConfigurationInner createOrUpdate( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName, SourceControlConfigurationInner sourceControlConfiguration) { @@ -637,7 +637,7 @@ public SourceControlConfigurationInner createOrUpdate( /** * Create a new Kubernetes Source Control Configuration. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -654,8 +654,8 @@ public SourceControlConfigurationInner createOrUpdate( @ServiceMethod(returns = ReturnType.SINGLE) public Response createOrUpdateWithResponse( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName, SourceControlConfigurationInner sourceControlConfiguration, @@ -675,7 +675,7 @@ public Response createOrUpdateWithResponse( * This will delete the YAML file used to set up the Source control configuration, thus stopping future sync from * the source repo. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -690,8 +690,8 @@ public Response createOrUpdateWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName) { if (this.client.getEndpoint() == null) { @@ -749,7 +749,7 @@ private Mono>> deleteWithResponseAsync( * This will delete the YAML file used to set up the Source control configuration, thus stopping future sync from * the source repo. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -765,8 +765,8 @@ private Mono>> deleteWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName, Context context) { @@ -822,7 +822,7 @@ private Mono>> deleteWithResponseAsync( * This will delete the YAML file used to set up the Source control configuration, thus stopping future sync from * the source repo. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -837,8 +837,8 @@ private Mono>> deleteWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName) { Mono>> mono = @@ -853,7 +853,7 @@ private PollerFlux, Void> beginDeleteAsync( * This will delete the YAML file used to set up the Source control configuration, thus stopping future sync from * the source repo. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -869,8 +869,8 @@ private PollerFlux, Void> beginDeleteAsync( @ServiceMethod(returns = ReturnType.SINGLE) private PollerFlux, Void> beginDeleteAsync( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName, Context context) { @@ -892,7 +892,7 @@ private PollerFlux, Void> beginDeleteAsync( * This will delete the YAML file used to set up the Source control configuration, thus stopping future sync from * the source repo. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -907,8 +907,8 @@ private PollerFlux, Void> beginDeleteAsync( @ServiceMethod(returns = ReturnType.SINGLE) public SyncPoller, Void> beginDelete( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName) { return beginDeleteAsync( @@ -920,7 +920,7 @@ public SyncPoller, Void> beginDelete( * This will delete the YAML file used to set up the Source control configuration, thus stopping future sync from * the source repo. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -936,8 +936,8 @@ public SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.SINGLE) public SyncPoller, Void> beginDelete( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName, Context context) { @@ -950,7 +950,7 @@ public SyncPoller, Void> beginDelete( * This will delete the YAML file used to set up the Source control configuration, thus stopping future sync from * the source repo. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -965,8 +965,8 @@ public SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName) { return beginDeleteAsync( @@ -979,7 +979,7 @@ private Mono deleteAsync( * This will delete the YAML file used to set up the Source control configuration, thus stopping future sync from * the source repo. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -995,8 +995,8 @@ private Mono deleteAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName, Context context) { @@ -1010,7 +1010,7 @@ private Mono deleteAsync( * This will delete the YAML file used to set up the Source control configuration, thus stopping future sync from * the source repo. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -1024,8 +1024,8 @@ private Mono deleteAsync( @ServiceMethod(returns = ReturnType.SINGLE) public void delete( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName) { deleteAsync(resourceGroupName, clusterRp, clusterResourceName, clusterName, sourceControlConfigurationName) @@ -1036,7 +1036,7 @@ public void delete( * This will delete the YAML file used to set up the Source control configuration, thus stopping future sync from * the source repo. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -1051,8 +1051,8 @@ public void delete( @ServiceMethod(returns = ReturnType.SINGLE) public void delete( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName, Context context) { @@ -1064,7 +1064,7 @@ public void delete( /** * List all Source Control Configurations. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -1078,8 +1078,8 @@ public void delete( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName) { if (this.client.getEndpoint() == null) { return Mono @@ -1137,7 +1137,7 @@ private Mono> listSinglePageAsync /** * List all Source Control Configurations. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -1152,8 +1152,8 @@ private Mono> listSinglePageAsync @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, Context context) { if (this.client.getEndpoint() == null) { @@ -1209,7 +1209,7 @@ private Mono> listSinglePageAsync /** * List all Source Control Configurations. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -1223,8 +1223,8 @@ private Mono> listSinglePageAsync @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName) { return new PagedFlux<>( () -> listSinglePageAsync(resourceGroupName, clusterRp, clusterResourceName, clusterName), @@ -1234,7 +1234,7 @@ private PagedFlux listAsync( /** * List all Source Control Configurations. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -1249,8 +1249,8 @@ private PagedFlux listAsync( @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, Context context) { return new PagedFlux<>( @@ -1261,7 +1261,7 @@ private PagedFlux listAsync( /** * List all Source Control Configurations. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -1275,8 +1275,8 @@ private PagedFlux listAsync( @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName) { return new PagedIterable<>(listAsync(resourceGroupName, clusterRp, clusterResourceName, clusterName)); } @@ -1284,7 +1284,7 @@ public PagedIterable list( /** * List all Source Control Configurations. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -1299,8 +1299,8 @@ public PagedIterable list( @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable list( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, Context context) { return new PagedIterable<>(listAsync(resourceGroupName, clusterRp, clusterResourceName, clusterName, context)); 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 002655428ad4f..8352d3010a3a7 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 @@ -11,10 +11,10 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.kubernetesconfiguration.fluent.SourceControlConfigurationsClient; import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.SourceControlConfigurationInner; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionsClusterResourceName; +import com.azure.resourcemanager.kubernetesconfiguration.models.ExtensionsClusterRp; import com.azure.resourcemanager.kubernetesconfiguration.models.SourceControlConfiguration; import com.azure.resourcemanager.kubernetesconfiguration.models.SourceControlConfigurations; -import com.azure.resourcemanager.kubernetesconfiguration.models.SourceControlConfigurationsClusterResourceName; -import com.azure.resourcemanager.kubernetesconfiguration.models.SourceControlConfigurationsClusterRp; import com.fasterxml.jackson.annotation.JsonIgnore; public final class SourceControlConfigurationsImpl implements SourceControlConfigurations { @@ -33,8 +33,8 @@ public SourceControlConfigurationsImpl( public SourceControlConfiguration get( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName) { SourceControlConfigurationInner inner = @@ -50,8 +50,8 @@ public SourceControlConfiguration get( public Response getWithResponse( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName, Context context) { @@ -78,8 +78,8 @@ public Response getWithResponse( public SourceControlConfiguration createOrUpdate( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName, SourceControlConfigurationInner sourceControlConfiguration) { @@ -102,8 +102,8 @@ public SourceControlConfiguration createOrUpdate( public Response createOrUpdateWithResponse( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName, SourceControlConfigurationInner sourceControlConfiguration, @@ -132,8 +132,8 @@ public Response createOrUpdateWithResponse( public void delete( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName) { this @@ -143,8 +143,8 @@ public void delete( public void delete( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName, Context context) { @@ -161,8 +161,8 @@ public void delete( public PagedIterable list( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterRp, clusterResourceName, clusterName); @@ -171,8 +171,8 @@ public PagedIterable list( public PagedIterable list( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, Context context) { PagedIterable inner = diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ClusterExtensionTypeClusterType.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ClusterExtensionTypeClusterType.java new file mode 100644 index 0000000000000..0b8af97a8fc69 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ClusterExtensionTypeClusterType.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kubernetesconfiguration.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ClusterExtensionTypeClusterType. */ +public final class ClusterExtensionTypeClusterType extends ExpandableStringEnum { + /** Static value managedClusters for ClusterExtensionTypeClusterType. */ + public static final ClusterExtensionTypeClusterType MANAGED_CLUSTERS = fromString("managedClusters"); + + /** Static value connectedClusters for ClusterExtensionTypeClusterType. */ + public static final ClusterExtensionTypeClusterType CONNECTED_CLUSTERS = fromString("connectedClusters"); + + /** + * Creates or finds a ClusterExtensionTypeClusterType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ClusterExtensionTypeClusterType. + */ + @JsonCreator + public static ClusterExtensionTypeClusterType fromString(String name) { + return fromString(name, ClusterExtensionTypeClusterType.class); + } + + /** @return known ClusterExtensionTypeClusterType values. */ + public static Collection values() { + return values(ClusterExtensionTypeClusterType.class); + } +} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ClusterExtensionTypes.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ClusterExtensionTypes.java new file mode 100644 index 0000000000000..0a115321d1a18 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ClusterExtensionTypes.java @@ -0,0 +1,57 @@ +// 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.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of ClusterExtensionTypes. */ +public interface ClusterExtensionTypes { + /** + * Get Extension Type details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterType The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param extensionTypeName Extension type name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return extension Type details. + */ + ExtensionType get( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ClusterExtensionTypeClusterType clusterType, + String clusterName, + String extensionTypeName); + + /** + * Get Extension Type details. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterType The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param extensionTypeName Extension type name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return extension Type details. + */ + Response getWithResponse( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ClusterExtensionTypeClusterType clusterType, + String clusterName, + String extensionTypeName, + Context context); +} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ClusterExtensionTypesOperations.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ClusterExtensionTypesOperations.java new file mode 100644 index 0000000000000..7dd68789c43bb --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ClusterExtensionTypesOperations.java @@ -0,0 +1,41 @@ +// 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.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** Resource collection API of ClusterExtensionTypesOperations. */ +public interface ClusterExtensionTypesOperations { + /** + * Get Extension Types. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return extension Types. + */ + PagedIterable list(String resourceGroupName, ExtensionsClusterRp clusterRp, String clusterName); + + /** + * Get Extension Types. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @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 extension Types. + */ + PagedIterable list( + String resourceGroupName, ExtensionsClusterRp clusterRp, String clusterName, Context context); +} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ClusterScopeSettings.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ClusterScopeSettings.java new file mode 100644 index 0000000000000..c7ec63e3b7cb7 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ClusterScopeSettings.java @@ -0,0 +1,79 @@ +// 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.annotation.JsonFlatten; +import com.azure.core.management.ProxyResource; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Extension scope settings. */ +@JsonFlatten +@Fluent +public class ClusterScopeSettings extends ProxyResource { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterScopeSettings.class); + + /* + * Describes if multiple instances of the extension are allowed + */ + @JsonProperty(value = "properties.allowMultipleInstances") + private Boolean allowMultipleInstances; + + /* + * Default extension release namespace + */ + @JsonProperty(value = "properties.defaultReleaseNamespace") + private String defaultReleaseNamespace; + + /** + * Get the allowMultipleInstances property: Describes if multiple instances of the extension are allowed. + * + * @return the allowMultipleInstances value. + */ + public Boolean allowMultipleInstances() { + return this.allowMultipleInstances; + } + + /** + * Set the allowMultipleInstances property: Describes if multiple instances of the extension are allowed. + * + * @param allowMultipleInstances the allowMultipleInstances value to set. + * @return the ClusterScopeSettings object itself. + */ + public ClusterScopeSettings withAllowMultipleInstances(Boolean allowMultipleInstances) { + this.allowMultipleInstances = allowMultipleInstances; + return this; + } + + /** + * Get the defaultReleaseNamespace property: Default extension release namespace. + * + * @return the defaultReleaseNamespace value. + */ + public String defaultReleaseNamespace() { + return this.defaultReleaseNamespace; + } + + /** + * Set the defaultReleaseNamespace property: Default extension release namespace. + * + * @param defaultReleaseNamespace the defaultReleaseNamespace value to set. + * @return the ClusterScopeSettings object itself. + */ + public ClusterScopeSettings withDefaultReleaseNamespace(String defaultReleaseNamespace) { + this.defaultReleaseNamespace = defaultReleaseNamespace; + 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/ClusterTypes.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ClusterTypes.java new file mode 100644 index 0000000000000..78999966cb671 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ClusterTypes.java @@ -0,0 +1,47 @@ +// 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.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for ClusterTypes. */ +public enum ClusterTypes { + /** Enum value connectedClusters. */ + CONNECTED_CLUSTERS("connectedClusters"), + + /** Enum value managedClusters. */ + MANAGED_CLUSTERS("managedClusters"); + + /** The actual serialized value for a ClusterTypes instance. */ + private final String value; + + ClusterTypes(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ClusterTypes instance. + * + * @param value the serialized value to parse. + * @return the parsed ClusterTypes object, or null if unable to parse. + */ + @JsonCreator + public static ClusterTypes fromString(String value) { + ClusterTypes[] items = ClusterTypes.values(); + for (ClusterTypes item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} 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 new file mode 100644 index 0000000000000..d881fde650531 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/Extension.java @@ -0,0 +1,147 @@ +// 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.management.SystemData; +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.ExtensionInner; +import java.util.List; +import java.util.Map; + +/** An immutable client-side representation of Extension. */ +public interface Extension { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the identity property: Identity of the Extension resource. + * + * @return the identity value. + */ + Identity identity(); + + /** + * Gets the systemData property: Top level metadata + * https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * 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. + * + * @return the extensionType value. + */ + String extensionType(); + + /** + * Gets the autoUpgradeMinorVersion property: Flag to note if this extension participates in auto upgrade of minor + * version, or not. + * + * @return the autoUpgradeMinorVersion value. + */ + Boolean autoUpgradeMinorVersion(); + + /** + * Gets the releaseTrain property: ReleaseTrain this extension participates in for auto-upgrade (e.g. Stable, + * Preview, etc.) - only if autoUpgradeMinorVersion is 'true'. + * + * @return the releaseTrain value. + */ + String releaseTrain(); + + /** + * Gets the version property: Version of the extension for this extension, if it is 'pinned' to a specific version. + * autoUpgradeMinorVersion must be 'false'. + * + * @return the version value. + */ + String version(); + + /** + * Gets the scope property: Scope at which the extension is installed. + * + * @return the scope value. + */ + Scope scope(); + + /** + * Gets the configurationSettings property: Configuration settings, as name-value pairs for configuring this + * extension. + * + * @return the configurationSettings value. + */ + Map configurationSettings(); + + /** + * Gets the configurationProtectedSettings property: Configuration settings that are sensitive, as name-value pairs + * for configuring this extension. + * + * @return the configurationProtectedSettings value. + */ + Map configurationProtectedSettings(); + + /** + * Gets the provisioningState property: Status of installation of this extension. + * + * @return the provisioningState value. + */ + ProvisioningState provisioningState(); + + /** + * Gets the statuses property: Status from this extension. + * + * @return the statuses value. + */ + List statuses(); + + /** + * Gets the errorInfo property: Error information from the Agent - e.g. errors during installation. + * + * @return the errorInfo value. + */ + ManagementError errorInfo(); + + /** + * Gets the customLocationSettings property: Custom Location settings properties. + * + * @return the customLocationSettings value. + */ + Map customLocationSettings(); + + /** + * Gets the packageUri property: Uri of the Helm package. + * + * @return the packageUri value. + */ + String packageUri(); + + /** + * Gets the inner com.azure.resourcemanager.kubernetesconfiguration.fluent.models.ExtensionInner object. + * + * @return the inner object. + */ + ExtensionInner innerModel(); +} 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 new file mode 100644 index 0000000000000..c9f5b82a2ec7a --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionStatus.java @@ -0,0 +1,154 @@ +// 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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Status from the extension. */ +@Fluent +public final class ExtensionStatus { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ExtensionStatus.class); + + /* + * Status code provided by the Extension + */ + @JsonProperty(value = "code") + private String code; + + /* + * Short description of status of the extension. + */ + @JsonProperty(value = "displayStatus") + private String displayStatus; + + /* + * Level of the status. + */ + @JsonProperty(value = "level") + private LevelType level; + + /* + * Detailed message of the status from the Extension. + */ + @JsonProperty(value = "message") + private String message; + + /* + * DateLiteral (per ISO8601) noting the time of installation status. + */ + @JsonProperty(value = "time") + private String time; + + /** + * Get the code property: Status code provided by the Extension. + * + * @return the code value. + */ + public String code() { + return this.code; + } + + /** + * Set the code property: Status code provided by the Extension. + * + * @param code the code value to set. + * @return the ExtensionStatus object itself. + */ + public ExtensionStatus withCode(String code) { + this.code = code; + return this; + } + + /** + * Get the displayStatus property: Short description of status of the extension. + * + * @return the displayStatus value. + */ + public String displayStatus() { + return this.displayStatus; + } + + /** + * Set the displayStatus property: Short description of status of the extension. + * + * @param displayStatus the displayStatus value to set. + * @return the ExtensionStatus object itself. + */ + public ExtensionStatus withDisplayStatus(String displayStatus) { + this.displayStatus = displayStatus; + return this; + } + + /** + * Get the level property: Level of the status. + * + * @return the level value. + */ + public LevelType level() { + return this.level; + } + + /** + * Set the level property: Level of the status. + * + * @param level the level value to set. + * @return the ExtensionStatus object itself. + */ + public ExtensionStatus withLevel(LevelType level) { + this.level = level; + return this; + } + + /** + * Get the message property: Detailed message of the status from the Extension. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: Detailed message of the status from the Extension. + * + * @param message the message value to set. + * @return the ExtensionStatus object itself. + */ + public ExtensionStatus withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the time property: DateLiteral (per ISO8601) noting the time of installation status. + * + * @return the time value. + */ + public String time() { + return this.time; + } + + /** + * Set the time property: DateLiteral (per ISO8601) noting the time of installation status. + * + * @param time the time value to set. + * @return the ExtensionStatus object itself. + */ + public ExtensionStatus withTime(String time) { + this.time = time; + 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/ExtensionType.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionType.java new file mode 100644 index 0000000000000..fd0141c9836f4 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionType.java @@ -0,0 +1,47 @@ +// 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.management.SystemData; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.ExtensionTypeInner; +import java.util.List; + +/** An immutable client-side representation of ExtensionType. */ +public interface ExtensionType { + /** + * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the releaseTrains property: Extension release train: preview or stable. + * + * @return the releaseTrains value. + */ + List releaseTrains(); + + /** + * Gets the clusterTypes property: Cluster types. + * + * @return the clusterTypes value. + */ + ClusterTypes clusterTypes(); + + /** + * Gets the supportedScopes property: Extension scopes. + * + * @return the supportedScopes value. + */ + SupportedScopes supportedScopes(); + + /** + * Gets the inner com.azure.resourcemanager.kubernetesconfiguration.fluent.models.ExtensionTypeInner object. + * + * @return the inner object. + */ + ExtensionTypeInner innerModel(); +} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionTypeList.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionTypeList.java new file mode 100644 index 0000000000000..3aa0a8464bff5 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionTypeList.java @@ -0,0 +1,81 @@ +// 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.azure.resourcemanager.kubernetesconfiguration.fluent.models.ExtensionTypeInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List Extension Types. */ +@Fluent +public final class ExtensionTypeList { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ExtensionTypeList.class); + + /* + * The list of Extension Types + */ + @JsonProperty(value = "value") + private List value; + + /* + * The link to fetch the next page of Extension Types + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Get the value property: The list of Extension Types. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The list of Extension Types. + * + * @param value the value value to set. + * @return the ExtensionTypeList object itself. + */ + public ExtensionTypeList withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to fetch the next page of Extension Types. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to fetch the next page of Extension Types. + * + * @param nextLink the nextLink value to set. + * @return the ExtensionTypeList object itself. + */ + public ExtensionTypeList withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionTypeVersions.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionTypeVersions.java new file mode 100644 index 0000000000000..160e88a8ea7b1 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionTypeVersions.java @@ -0,0 +1,36 @@ +// 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.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** Resource collection API of ExtensionTypeVersions. */ +public interface ExtensionTypeVersions { + /** + * List available versions for an Extension Type. + * + * @param location extension location. + * @param extensionTypeName Extension type name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list versions for an Extension. + */ + PagedIterable list(String location, String extensionTypeName); + + /** + * List available versions for an Extension Type. + * + * @param location extension location. + * @param extensionTypeName Extension type name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list versions for an Extension. + */ + PagedIterable list(String location, String extensionTypeName, Context context); +} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionVersionList.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionVersionList.java new file mode 100644 index 0000000000000..18bcdb6b7b412 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionVersionList.java @@ -0,0 +1,96 @@ +// 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.management.SystemData; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** List versions for an Extension. */ +@Fluent +public final class ExtensionVersionList { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ExtensionVersionList.class); + + /* + * Versions available for this Extension Type + */ + @JsonProperty(value = "versions") + private List versions; + + /* + * The link to fetch the next page of Extension Types + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /* + * Metadata pertaining to creation and last modification of the resource. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Get the versions property: Versions available for this Extension Type. + * + * @return the versions value. + */ + public List versions() { + return this.versions; + } + + /** + * Set the versions property: Versions available for this Extension Type. + * + * @param versions the versions value to set. + * @return the ExtensionVersionList object itself. + */ + public ExtensionVersionList withVersions(List versions) { + this.versions = versions; + return this; + } + + /** + * Get the nextLink property: The link to fetch the next page of Extension Types. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to fetch the next page of Extension Types. + * + * @param nextLink the nextLink value to set. + * @return the ExtensionVersionList object itself. + */ + public ExtensionVersionList withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Get the systemData property: Metadata pertaining to creation and last modification of the resource. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (versions() != null) { + versions().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionVersionListVersionsItem.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionVersionListVersionsItem.java new file mode 100644 index 0000000000000..45252cb5b5353 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionVersionListVersionsItem.java @@ -0,0 +1,77 @@ +// 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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The ExtensionVersionListVersionsItem model. */ +@Fluent +public final class ExtensionVersionListVersionsItem { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ExtensionVersionListVersionsItem.class); + + /* + * The release train for this Extension Type + */ + @JsonProperty(value = "releaseTrain") + private String releaseTrain; + + /* + * Versions available for this Extension Type and release train + */ + @JsonProperty(value = "versions") + private List versions; + + /** + * Get the releaseTrain property: The release train for this Extension Type. + * + * @return the releaseTrain value. + */ + public String releaseTrain() { + return this.releaseTrain; + } + + /** + * Set the releaseTrain property: The release train for this Extension Type. + * + * @param releaseTrain the releaseTrain value to set. + * @return the ExtensionVersionListVersionsItem object itself. + */ + public ExtensionVersionListVersionsItem withReleaseTrain(String releaseTrain) { + this.releaseTrain = releaseTrain; + return this; + } + + /** + * Get the versions property: Versions available for this Extension Type and release train. + * + * @return the versions value. + */ + public List versions() { + return this.versions; + } + + /** + * Set the versions property: Versions available for this Extension Type and release train. + * + * @param versions the versions value to set. + * @return the ExtensionVersionListVersionsItem object itself. + */ + public ExtensionVersionListVersionsItem withVersions(List versions) { + this.versions = versions; + 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/Extensions.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/Extensions.java new file mode 100644 index 0000000000000..3f0b08b0511c0 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/Extensions.java @@ -0,0 +1,220 @@ +// 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.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.ExtensionInner; + +/** Resource collection API of Extensions. */ +public interface Extensions { + /** + * Create a new Kubernetes Cluster Extension. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param extensionName Name of the Extension. + * @param extension Properties necessary to Create an 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 the Extension object. + */ + Extension create( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + ExtensionInner extension); + + /** + * Create a new Kubernetes Cluster Extension. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param extensionName Name of the Extension. + * @param extension Properties necessary to Create an 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 the Extension object. + */ + Extension create( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + 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 - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @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, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName); + + /** + * Gets Kubernetes Cluster Extension. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @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. + */ + Response getWithResponse( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + 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 - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @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. + */ + void delete( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + Boolean forceDelete); + + /** + * 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 - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @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. + */ + void delete( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName); + + /** + * 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 - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + Boolean forceDelete, + Context context); + + /** + * List all Extensions in the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to list Extensions. + */ + PagedIterable list( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName); + + /** + * List all Extensions in the cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return result of the request to list Extensions. + */ + PagedIterable list( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + Context context); +} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionsClusterResourceName.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionsClusterResourceName.java new file mode 100644 index 0000000000000..57cc5a8a731b0 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionsClusterResourceName.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kubernetesconfiguration.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ExtensionsClusterResourceName. */ +public final class ExtensionsClusterResourceName extends ExpandableStringEnum { + /** Static value managedClusters for ExtensionsClusterResourceName. */ + public static final ExtensionsClusterResourceName MANAGED_CLUSTERS = fromString("managedClusters"); + + /** Static value connectedClusters for ExtensionsClusterResourceName. */ + public static final ExtensionsClusterResourceName CONNECTED_CLUSTERS = fromString("connectedClusters"); + + /** + * Creates or finds a ExtensionsClusterResourceName from its string representation. + * + * @param name a name to look for. + * @return the corresponding ExtensionsClusterResourceName. + */ + @JsonCreator + public static ExtensionsClusterResourceName fromString(String name) { + return fromString(name, ExtensionsClusterResourceName.class); + } + + /** @return known ExtensionsClusterResourceName values. */ + public static Collection values() { + return values(ExtensionsClusterResourceName.class); + } +} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionsClusterRp.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionsClusterRp.java new file mode 100644 index 0000000000000..8793eb9100f81 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionsClusterRp.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kubernetesconfiguration.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ExtensionsClusterRp. */ +public final class ExtensionsClusterRp extends ExpandableStringEnum { + /** Static value Microsoft.ContainerService for ExtensionsClusterRp. */ + public static final ExtensionsClusterRp MICROSOFT_CONTAINER_SERVICE = fromString("Microsoft.ContainerService"); + + /** Static value Microsoft.Kubernetes for ExtensionsClusterRp. */ + public static final ExtensionsClusterRp MICROSOFT_KUBERNETES = fromString("Microsoft.Kubernetes"); + + /** + * Creates or finds a ExtensionsClusterRp from its string representation. + * + * @param name a name to look for. + * @return the corresponding ExtensionsClusterRp. + */ + @JsonCreator + public static ExtensionsClusterRp fromString(String name) { + return fromString(name, ExtensionsClusterRp.class); + } + + /** @return known ExtensionsClusterRp values. */ + public static Collection values() { + return values(ExtensionsClusterRp.class); + } +} 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 new file mode 100644 index 0000000000000..5ba0f34af035c --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ExtensionsList.java @@ -0,0 +1,62 @@ +// 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.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.ExtensionInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Result of the request to list Extensions. It contains a list of Extension objects and a URL link to get the next set + * of results. + */ +@Immutable +public final class ExtensionsList { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ExtensionsList.class); + + /* + * List of Extensions within a Kubernetes cluster. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /* + * URL to get the next set of extension objects, if any. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Get the value property: List of Extensions within a Kubernetes cluster. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: URL to get the next set of extension objects, if any. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/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 new file mode 100644 index 0000000000000..80840b9bbfded --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/Identity.java @@ -0,0 +1,80 @@ +// 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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Identity for the resource. */ +@Fluent +public class Identity { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Identity.class); + + /* + * The principal ID of resource identity. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private String principalId; + + /* + * The tenant ID of resource. + */ + @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) + private String tenantId; + + /* + * The identity type. + */ + @JsonProperty(value = "type") + private ResourceIdentityType type; + + /** + * Get the principalId property: The principal ID of resource identity. + * + * @return the principalId value. + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the tenantId property: The tenant ID of resource. + * + * @return the tenantId value. + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Get the type property: The identity type. + * + * @return the type value. + */ + public ResourceIdentityType type() { + return this.type; + } + + /** + * Set the type property: The identity type. + * + * @param type the type value to set. + * @return the Identity object itself. + */ + public Identity withType(ResourceIdentityType type) { + this.type = type; + 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/LevelType.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/LevelType.java new file mode 100644 index 0000000000000..45628120dca83 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/LevelType.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kubernetesconfiguration.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for LevelType. */ +public final class LevelType extends ExpandableStringEnum { + /** Static value Error for LevelType. */ + public static final LevelType ERROR = fromString("Error"); + + /** Static value Warning for LevelType. */ + public static final LevelType WARNING = fromString("Warning"); + + /** Static value Information for LevelType. */ + public static final LevelType INFORMATION = fromString("Information"); + + /** + * Creates or finds a LevelType from its string representation. + * + * @param name a name to look for. + * @return the corresponding LevelType. + */ + @JsonCreator + public static LevelType fromString(String name) { + return fromString(name, LevelType.class); + } + + /** @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/LocationExtensionTypes.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/LocationExtensionTypes.java new file mode 100644 index 0000000000000..7395962a789d8 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/LocationExtensionTypes.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kubernetesconfiguration.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** Resource collection API of LocationExtensionTypes. */ +public interface LocationExtensionTypes { + /** + * List all Extension Types. + * + * @param location extension location. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list Extension Types. + */ + PagedIterable list(String location); + + /** + * List all Extension Types. + * + * @param location extension location. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list Extension Types. + */ + PagedIterable list(String location, Context context); +} 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 new file mode 100644 index 0000000000000..a864a45209968 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/OperationStatus.java @@ -0,0 +1,104 @@ +// 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.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of OperationStatus. */ +public interface OperationStatus { + /** + * List Async Operations, currently in progress, in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the async operations in progress, in the cluster. + */ + PagedIterable list( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName); + + /** + * List Async Operations, currently in progress, in a cluster. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @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 async operations in progress, in the cluster. + */ + PagedIterable list( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + Context context); + + /** + * Get Async Operation status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @param clusterName The name of the kubernetes cluster. + * @param extensionName Name of the Extension. + * @param operationId operation Id. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return async Operation status. + */ + OperationStatusResult get( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + String operationId); + + /** + * Get Async Operation status. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or + * Microsoft.Kubernetes (for OnPrem K8S clusters). + * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or + * connectedClusters (for OnPrem K8S clusters). + * @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. + */ + Response getWithResponse( + String resourceGroupName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, + String clusterName, + String extensionName, + String operationId, + Context context); +} 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 new file mode 100644 index 0000000000000..03644581b3d04 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/OperationStatusList.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kubernetesconfiguration.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.OperationStatusResultInner; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The async operations in progress, in the cluster. */ +@Immutable +public final class OperationStatusList { + @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationStatusList.class); + + /* + * List of async operations in progress, in the cluster. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private List value; + + /* + * URL to get the next set of Operation Result objects, if any. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Get the value property: List of async operations in progress, in the cluster. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Get the nextLink property: URL to get the next set of Operation Result objects, if any. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/OperationStatusResult.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/OperationStatusResult.java new file mode 100644 index 0000000000000..c691ace343a69 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/OperationStatusResult.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kubernetesconfiguration.models; + +import com.azure.core.management.exception.ManagementError; +import com.azure.resourcemanager.kubernetesconfiguration.fluent.models.OperationStatusResultInner; +import java.util.Map; + +/** An immutable client-side representation of OperationStatusResult. */ +public interface OperationStatusResult { + /** + * Gets the id property: Fully qualified ID for the async operation. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: Name of the async operation. + * + * @return the name value. + */ + String name(); + + /** + * Gets the status property: Operation status. + * + * @return the status value. + */ + String status(); + + /** + * Gets the properties property: Additional information, if available. + * + * @return the properties value. + */ + Map properties(); + + /** + * Gets the error property: If present, details of the operation error. + * + * @return the error value. + */ + ManagementError error(); + + /** + * Gets the inner com.azure.resourcemanager.kubernetesconfiguration.fluent.models.OperationStatusResultInner object. + * + * @return the inner object. + */ + OperationStatusResultInner innerModel(); +} 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 new file mode 100644 index 0000000000000..814f95bc64c07 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ProvisioningState.java @@ -0,0 +1,46 @@ +// 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.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ProvisioningState. */ +public final class ProvisioningState extends ExpandableStringEnum { + /** Static value Succeeded for ProvisioningState. */ + public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for ProvisioningState. */ + public static final ProvisioningState FAILED = fromString("Failed"); + + /** Static value Canceled for ProvisioningState. */ + public static final ProvisioningState CANCELED = fromString("Canceled"); + + /** Static value Creating for ProvisioningState. */ + public static final ProvisioningState CREATING = fromString("Creating"); + + /** Static value Updating for ProvisioningState. */ + public static final ProvisioningState UPDATING = fromString("Updating"); + + /** Static value Deleting for ProvisioningState. */ + public static final ProvisioningState DELETING = fromString("Deleting"); + + /** + * Creates or finds a ProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ProvisioningState. + */ + @JsonCreator + public static ProvisioningState fromString(String name) { + return fromString(name, ProvisioningState.class); + } + + /** @return known ProvisioningState values. */ + public static Collection values() { + return values(ProvisioningState.class); + } +} 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 new file mode 100644 index 0000000000000..9b2c1ff1c2841 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ResourceIdentityType.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kubernetesconfiguration.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** Defines values for ResourceIdentityType. */ +public enum ResourceIdentityType { + /** Enum value SystemAssigned. */ + SYSTEM_ASSIGNED("SystemAssigned"); + + /** The actual serialized value for a ResourceIdentityType instance. */ + private final String value; + + ResourceIdentityType(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a ResourceIdentityType instance. + * + * @param value the serialized value to parse. + * @return the parsed ResourceIdentityType object, or null if unable to parse. + */ + @JsonCreator + public static ResourceIdentityType fromString(String value) { + ResourceIdentityType[] items = ResourceIdentityType.values(); + for (ResourceIdentityType item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ResourceProviderOperation.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ResourceProviderOperation.java index 6121074ccac1e..7b441d8890289 100644 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ResourceProviderOperation.java +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ResourceProviderOperation.java @@ -22,6 +22,14 @@ public interface ResourceProviderOperation { */ ResourceProviderOperationDisplay display(); + /** + * Gets the origin property: The intended executor of the operation;governs the display of the operation in the RBAC + * UX and the audit logs UX. + * + * @return the origin value. + */ + String origin(); + /** * Gets the isDataAction property: The flag that indicates whether the operation applies to data plane. * 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 new file mode 100644 index 0000000000000..8fb3e61e59a49 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/Scope.java @@ -0,0 +1,82 @@ +// 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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Scope of the extension. It can be either Cluster or Namespace; but not both. */ +@Fluent +public final class Scope { + @JsonIgnore private final ClientLogger logger = new ClientLogger(Scope.class); + + /* + * Specifies that the scope of the extension is Cluster + */ + @JsonProperty(value = "cluster") + private ScopeCluster cluster; + + /* + * Specifies that the scope of the extension is Namespace + */ + @JsonProperty(value = "namespace") + private ScopeNamespace namespace; + + /** + * Get the cluster property: Specifies that the scope of the extension is Cluster. + * + * @return the cluster value. + */ + public ScopeCluster cluster() { + return this.cluster; + } + + /** + * Set the cluster property: Specifies that the scope of the extension is Cluster. + * + * @param cluster the cluster value to set. + * @return the Scope object itself. + */ + public Scope withCluster(ScopeCluster cluster) { + this.cluster = cluster; + return this; + } + + /** + * Get the namespace property: Specifies that the scope of the extension is Namespace. + * + * @return the namespace value. + */ + public ScopeNamespace namespace() { + return this.namespace; + } + + /** + * Set the namespace property: Specifies that the scope of the extension is Namespace. + * + * @param namespace the namespace value to set. + * @return the Scope object itself. + */ + public Scope withNamespace(ScopeNamespace namespace) { + this.namespace = namespace; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (cluster() != null) { + cluster().validate(); + } + if (namespace() != null) { + namespace().validate(); + } + } +} 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 new file mode 100644 index 0000000000000..21cbad96ea18a --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ScopeCluster.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kubernetesconfiguration.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Specifies that the scope of the extension is Cluster. */ +@Fluent +public final class ScopeCluster { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ScopeCluster.class); + + /* + * 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; + + /** + * 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. + * + * @return the releaseNamespace value. + */ + public String releaseNamespace() { + return this.releaseNamespace; + } + + /** + * Set 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. + * + * @param releaseNamespace the releaseNamespace value to set. + * @return the ScopeCluster object itself. + */ + public ScopeCluster withReleaseNamespace(String releaseNamespace) { + this.releaseNamespace = releaseNamespace; + 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/ScopeNamespace.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ScopeNamespace.java new file mode 100644 index 0000000000000..6acc69c102172 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/ScopeNamespace.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.kubernetesconfiguration.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Specifies that the scope of the extension is Namespace. */ +@Fluent +public final class ScopeNamespace { + @JsonIgnore private final ClientLogger logger = new ClientLogger(ScopeNamespace.class); + + /* + * 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; + + /** + * 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. + * + * @return the targetNamespace value. + */ + public String targetNamespace() { + return this.targetNamespace; + } + + /** + * Set 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. + * + * @param targetNamespace the targetNamespace value to set. + * @return the ScopeNamespace object itself. + */ + public ScopeNamespace withTargetNamespace(String targetNamespace) { + this.targetNamespace = targetNamespace; + 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/SourceControlConfigurations.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/SourceControlConfigurations.java index caf2d5294bdbd..c32fe697e64da 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 @@ -14,7 +14,7 @@ public interface SourceControlConfigurations { /** * Gets details of the Source Control Configuration. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -28,15 +28,15 @@ public interface SourceControlConfigurations { */ SourceControlConfiguration get( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName); /** * Gets details of the Source Control Configuration. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -51,8 +51,8 @@ SourceControlConfiguration get( */ Response getWithResponse( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName, Context context); @@ -60,7 +60,7 @@ Response getWithResponse( /** * Create a new Kubernetes Source Control Configuration. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -75,8 +75,8 @@ Response getWithResponse( */ SourceControlConfiguration createOrUpdate( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName, SourceControlConfigurationInner sourceControlConfiguration); @@ -84,7 +84,7 @@ SourceControlConfiguration createOrUpdate( /** * Create a new Kubernetes Source Control Configuration. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -100,8 +100,8 @@ SourceControlConfiguration createOrUpdate( */ Response createOrUpdateWithResponse( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName, SourceControlConfigurationInner sourceControlConfiguration, @@ -111,7 +111,7 @@ Response createOrUpdateWithResponse( * This will delete the YAML file used to set up the Source control configuration, thus stopping future sync from * the source repo. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -124,8 +124,8 @@ Response createOrUpdateWithResponse( */ void delete( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName); @@ -133,7 +133,7 @@ void delete( * This will delete the YAML file used to set up the Source control configuration, thus stopping future sync from * the source repo. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -147,8 +147,8 @@ void delete( */ void delete( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, String sourceControlConfigurationName, Context context); @@ -156,7 +156,7 @@ void delete( /** * List all Source Control Configurations. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -169,14 +169,14 @@ void delete( */ PagedIterable list( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName); /** * List all Source Control Configurations. * - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterRp The Kubernetes cluster RP - either Microsoft.ContainerService (for AKS clusters) or * Microsoft.Kubernetes (for OnPrem K8S clusters). * @param clusterResourceName The Kubernetes cluster resource name - either managedClusters (for AKS clusters) or @@ -190,8 +190,8 @@ PagedIterable list( */ PagedIterable list( String resourceGroupName, - SourceControlConfigurationsClusterRp clusterRp, - SourceControlConfigurationsClusterResourceName clusterResourceName, + ExtensionsClusterRp clusterRp, + ExtensionsClusterResourceName clusterResourceName, String clusterName, Context context); } diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/SourceControlConfigurationsClusterResourceName.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/SourceControlConfigurationsClusterResourceName.java deleted file mode 100644 index 6541e224413c1..0000000000000 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/SourceControlConfigurationsClusterResourceName.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kubernetesconfiguration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for SourceControlConfigurationsClusterResourceName. */ -public final class SourceControlConfigurationsClusterResourceName - extends ExpandableStringEnum { - /** Static value managedClusters for SourceControlConfigurationsClusterResourceName. */ - public static final SourceControlConfigurationsClusterResourceName MANAGED_CLUSTERS = fromString("managedClusters"); - - /** Static value connectedClusters for SourceControlConfigurationsClusterResourceName. */ - public static final SourceControlConfigurationsClusterResourceName CONNECTED_CLUSTERS = - fromString("connectedClusters"); - - /** - * Creates or finds a SourceControlConfigurationsClusterResourceName from its string representation. - * - * @param name a name to look for. - * @return the corresponding SourceControlConfigurationsClusterResourceName. - */ - @JsonCreator - public static SourceControlConfigurationsClusterResourceName fromString(String name) { - return fromString(name, SourceControlConfigurationsClusterResourceName.class); - } - - /** @return known SourceControlConfigurationsClusterResourceName values. */ - public static Collection values() { - return values(SourceControlConfigurationsClusterResourceName.class); - } -} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/SourceControlConfigurationsClusterRp.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/SourceControlConfigurationsClusterRp.java deleted file mode 100644 index b74cbd1dbbb29..0000000000000 --- a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/SourceControlConfigurationsClusterRp.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.kubernetesconfiguration.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for SourceControlConfigurationsClusterRp. */ -public final class SourceControlConfigurationsClusterRp - extends ExpandableStringEnum { - /** Static value Microsoft.ContainerService for SourceControlConfigurationsClusterRp. */ - public static final SourceControlConfigurationsClusterRp MICROSOFT_CONTAINER_SERVICE = - fromString("Microsoft.ContainerService"); - - /** Static value Microsoft.Kubernetes for SourceControlConfigurationsClusterRp. */ - public static final SourceControlConfigurationsClusterRp MICROSOFT_KUBERNETES = fromString("Microsoft.Kubernetes"); - - /** - * Creates or finds a SourceControlConfigurationsClusterRp from its string representation. - * - * @param name a name to look for. - * @return the corresponding SourceControlConfigurationsClusterRp. - */ - @JsonCreator - public static SourceControlConfigurationsClusterRp fromString(String name) { - return fromString(name, SourceControlConfigurationsClusterRp.class); - } - - /** @return known SourceControlConfigurationsClusterRp values. */ - public static Collection values() { - return values(SourceControlConfigurationsClusterRp.class); - } -} diff --git a/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/SupportedScopes.java b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/SupportedScopes.java new file mode 100644 index 0000000000000..fd29a71df3098 --- /dev/null +++ b/sdk/kubernetesconfiguration/azure-resourcemanager-kubernetesconfiguration/src/main/java/com/azure/resourcemanager/kubernetesconfiguration/models/SupportedScopes.java @@ -0,0 +1,79 @@ +// 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.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Extension scopes. */ +@Fluent +public final class SupportedScopes { + @JsonIgnore private final ClientLogger logger = new ClientLogger(SupportedScopes.class); + + /* + * Default extension scopes: cluster or namespace + */ + @JsonProperty(value = "defaultScope") + private String defaultScope; + + /* + * Scope settings + */ + @JsonProperty(value = "clusterScopeSettings") + private ClusterScopeSettings clusterScopeSettings; + + /** + * Get the defaultScope property: Default extension scopes: cluster or namespace. + * + * @return the defaultScope value. + */ + public String defaultScope() { + return this.defaultScope; + } + + /** + * Set the defaultScope property: Default extension scopes: cluster or namespace. + * + * @param defaultScope the defaultScope value to set. + * @return the SupportedScopes object itself. + */ + public SupportedScopes withDefaultScope(String defaultScope) { + this.defaultScope = defaultScope; + return this; + } + + /** + * Get the clusterScopeSettings property: Scope settings. + * + * @return the clusterScopeSettings value. + */ + public ClusterScopeSettings clusterScopeSettings() { + return this.clusterScopeSettings; + } + + /** + * Set the clusterScopeSettings property: Scope settings. + * + * @param clusterScopeSettings the clusterScopeSettings value to set. + * @return the SupportedScopes object itself. + */ + public SupportedScopes withClusterScopeSettings(ClusterScopeSettings clusterScopeSettings) { + this.clusterScopeSettings = clusterScopeSettings; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (clusterScopeSettings() != null) { + clusterScopeSettings().validate(); + } + } +}