diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/CHANGELOG.md b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/CHANGELOG.md
index a2eb3d3672e5..b3c6284515a3 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/CHANGELOG.md
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/CHANGELOG.md
@@ -1,14 +1,69 @@
# Release History
-## 1.1.0-beta.2 (Unreleased)
+## 1.1.0-beta.2 (2025-05-13)
-### Features Added
+- Azure Resource Manager Hybridkubernetes client library for Java. This package contains Microsoft Azure SDK for Hybridkubernetes Management SDK. Azure Connected Cluster Resource Provider API for onboarding a Kubernetes Cluster to Azure Arc. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
### Breaking Changes
-### Bugs Fixed
+#### `models.ConnectedClusterList` was removed
-### Other Changes
+#### `HybridKubernetesManager$Configurable` was removed
+
+#### `models.OperationList` was removed
+
+#### `HybridKubernetesManager` was removed
+
+#### `models.OperationDisplay` was modified
+
+* `withResource(java.lang.String)` was removed
+* `withDescription(java.lang.String)` was removed
+* `withProvider(java.lang.String)` was removed
+* `withOperation(java.lang.String)` was removed
+
+#### `models.Operations` was modified
+
+* `get()` was removed
+* `get(com.azure.core.util.Context)` was removed
+
+#### `models.AadProfile` was modified
+
+* `withEnableAzureRbac(java.lang.Boolean)` was removed
+* `withTenantId(java.lang.String)` was removed
+* `enableAzureRbac()` was removed
+* `tenantId()` was removed
+
+### Features Added
+
+* `models.ActionType` was added
+
+* `HybridkubernetesManager` was added
+
+* `HybridkubernetesManager$Configurable` was added
+
+* `implementation.models.ConnectedClusterList` was added
+
+* `implementation.models.OperationList` was added
+
+* `models.Origin` was added
+
+#### `models.Operation` was modified
+
+* `actionType()` was added
+* `origin()` was added
+* `isDataAction()` was added
+
+#### `models.Operations` was modified
+
+* `list(com.azure.core.util.Context)` was added
+* `list()` was added
+
+#### `models.AadProfile` was modified
+
+* `withTenantID(java.lang.String)` was added
+* `tenantID()` was added
+* `withEnableAzureRBAC(java.lang.Boolean)` was added
+* `enableAzureRBAC()` was added
## 1.1.0-beta.1 (2025-03-25)
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/README.md b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/README.md
index 531e83ecbb35..f9f8aaa03c12 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/README.md
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/README.md
@@ -1,8 +1,8 @@
-# Azure Resource Manager HybridKubernetes client library for Java
+# Azure Resource Manager Hybridkubernetes client library for Java
-Azure Resource Manager HybridKubernetes client library for Java.
+Azure Resource Manager Hybridkubernetes client library for Java.
-This package contains Microsoft Azure SDK for HybridKubernetes Management SDK. Hybrid Kubernetes Client. Package tag package-2024-12-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for Hybridkubernetes Management SDK. Azure Connected Cluster Resource Provider API for onboarding a Kubernetes Cluster to Azure Arc. 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-hybridkubernetes
- 1.1.0-beta.1
+ 1.1.0-beta.2
```
[//]: # ({x-version-update-end})
@@ -56,7 +56,7 @@ AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD);
TokenCredential credential = new DefaultAzureCredentialBuilder()
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
.build();
-HybridKubernetesManager manager = HybridKubernetesManager
+HybridkubernetesManager manager = HybridkubernetesManager
.authenticate(credential, profile);
```
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/SAMPLE.md b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/SAMPLE.md
index 46baf0d40c62..a6d13c98ddfc 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/SAMPLE.md
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/SAMPLE.md
@@ -1,20 +1,223 @@
# Code snippets and samples
-## ConnectedCluster
+## ConnectedClusters
-- [CreateOrReplace](#connectedcluster_createorreplace)
-- [Delete](#connectedcluster_delete)
-- [GetByResourceGroup](#connectedcluster_getbyresourcegroup)
-- [List](#connectedcluster_list)
-- [ListByResourceGroup](#connectedcluster_listbyresourcegroup)
-- [ListClusterUserCredential](#connectedcluster_listclusterusercredential)
-- [Update](#connectedcluster_update)
+- [CreateOrReplace](#connectedclusters_createorreplace)
+- [Delete](#connectedclusters_delete)
+- [GetByResourceGroup](#connectedclusters_getbyresourcegroup)
+- [List](#connectedclusters_list)
+- [ListByResourceGroup](#connectedclusters_listbyresourcegroup)
+- [ListClusterUserCredential](#connectedclusters_listclusterusercredential)
+- [Update](#connectedclusters_update)
## Operations
-- [Get](#operations_get)
-### ConnectedCluster_CreateOrReplace
+- [List](#operations_list)
+### ConnectedClusters_CreateOrReplace
+
+```java
+/**
+ * Samples for ConnectedClusters Delete.
+ */
+public final class ConnectedClustersDeleteSamples {
+ /*
+ * x-ms-original-file: 2024-12-01-preview/DeleteClusterExample.json
+ */
+ /**
+ * Sample code: DeleteClusterExample.
+ *
+ * @param manager Entry point to HybridkubernetesManager.
+ */
+ public static void
+ deleteClusterExample(com.azure.resourcemanager.hybridkubernetes.HybridkubernetesManager manager) {
+ manager.connectedClusters().delete("k8sc-rg", "testCluster", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### ConnectedClusters_Delete
+
+```java
+/**
+ * Samples for ConnectedClusters List.
+ */
+public final class ConnectedClustersListSamples {
+ /*
+ * x-ms-original-file: 2024-12-01-preview/GetClustersBySubscriptionExample.json
+ */
+ /**
+ * Sample code: GetClustersBySubscriptionExample.
+ *
+ * @param manager Entry point to HybridkubernetesManager.
+ */
+ public static void
+ getClustersBySubscriptionExample(com.azure.resourcemanager.hybridkubernetes.HybridkubernetesManager manager) {
+ manager.connectedClusters().list(com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### ConnectedClusters_GetByResourceGroup
+
+```java
+/**
+ * Samples for ConnectedClusters ListByResourceGroup.
+ */
+public final class ConnectedClustersListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: 2024-12-01-preview/GetClustersByResourceGroupExample.json
+ */
+ /**
+ * Sample code: GetClustersExample.
+ *
+ * @param manager Entry point to HybridkubernetesManager.
+ */
+ public static void getClustersExample(com.azure.resourcemanager.hybridkubernetes.HybridkubernetesManager manager) {
+ manager.connectedClusters().listByResourceGroup("k8sc-rg", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### ConnectedClusters_List
+
+```java
+import com.azure.resourcemanager.hybridkubernetes.models.AuthenticationMethod;
+import com.azure.resourcemanager.hybridkubernetes.models.ListClusterUserCredentialProperties;
+
+/**
+ * Samples for ConnectedClusters ListClusterUserCredential.
+ */
+public final class ConnectedClustersListClusterUserCredentialSamples {
+ /*
+ * x-ms-original-file: 2024-12-01-preview/ConnectedClustersListClusterCredentialResultCSPAAD.json
+ */
+ /**
+ * Sample code: ListClusterUserCredentialExample.
+ *
+ * @param manager Entry point to HybridkubernetesManager.
+ */
+ public static void
+ listClusterUserCredentialExample(com.azure.resourcemanager.hybridkubernetes.HybridkubernetesManager manager) {
+ manager.connectedClusters()
+ .listClusterUserCredentialWithResponse("k8sc-rg", "testCluster",
+ new ListClusterUserCredentialProperties().withAuthenticationMethod(AuthenticationMethod.AAD)
+ .withClientProxy(true),
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2024-12-01-preview/ConnectedClustersListClusterCredentialResultHPAAD.json
+ */
+ /**
+ * Sample code: ListClusterUserCredentialCSPExample.
+ *
+ * @param manager Entry point to HybridkubernetesManager.
+ */
+ public static void listClusterUserCredentialCSPExample(
+ com.azure.resourcemanager.hybridkubernetes.HybridkubernetesManager manager) {
+ manager.connectedClusters()
+ .listClusterUserCredentialWithResponse("k8sc-rg", "testCluster",
+ new ListClusterUserCredentialProperties().withAuthenticationMethod(AuthenticationMethod.AAD)
+ .withClientProxy(false),
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2024-12-01-preview/ConnectedClustersListClusterCredentialResultCSPToken.json
+ */
+ /**
+ * Sample code: ListClusterUserCredentialNonAadExample.
+ *
+ * @param manager Entry point to HybridkubernetesManager.
+ */
+ public static void listClusterUserCredentialNonAadExample(
+ com.azure.resourcemanager.hybridkubernetes.HybridkubernetesManager manager) {
+ manager.connectedClusters()
+ .listClusterUserCredentialWithResponse("k8sc-rg", "testCluster",
+ new ListClusterUserCredentialProperties().withAuthenticationMethod(AuthenticationMethod.TOKEN)
+ .withClientProxy(true),
+ com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2024-12-01-preview/ConnectedClustersListClusterCredentialResultHPToken.json
+ */
+ /**
+ * Sample code: ListClusterUserCredentialNonAadCSPExample.
+ *
+ * @param manager Entry point to HybridkubernetesManager.
+ */
+ public static void listClusterUserCredentialNonAadCSPExample(
+ com.azure.resourcemanager.hybridkubernetes.HybridkubernetesManager manager) {
+ manager.connectedClusters()
+ .listClusterUserCredentialWithResponse("k8sc-rg", "testCluster",
+ new ListClusterUserCredentialProperties().withAuthenticationMethod(AuthenticationMethod.TOKEN)
+ .withClientProxy(false),
+ com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### ConnectedClusters_ListByResourceGroup
+
+```java
+/**
+ * Samples for ConnectedClusters GetByResourceGroup.
+ */
+public final class ConnectedClustersGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: 2024-12-01-preview/GetProvisionedClusterExample.json
+ */
+ /**
+ * Sample code: GetProvisionedClusterExample.
+ *
+ * @param manager Entry point to HybridkubernetesManager.
+ */
+ public static void
+ getProvisionedClusterExample(com.azure.resourcemanager.hybridkubernetes.HybridkubernetesManager manager) {
+ manager.connectedClusters()
+ .getByResourceGroupWithResponse("k8sc-rg", "testCluster", com.azure.core.util.Context.NONE);
+ }
+
+ /*
+ * x-ms-original-file: 2024-12-01-preview/GetClusterExample.json
+ */
+ /**
+ * Sample code: GetClusterExample.
+ *
+ * @param manager Entry point to HybridkubernetesManager.
+ */
+ public static void getClusterExample(com.azure.resourcemanager.hybridkubernetes.HybridkubernetesManager manager) {
+ manager.connectedClusters()
+ .getByResourceGroupWithResponse("k8sc-rg", "testCluster", com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### ConnectedClusters_ListClusterUserCredential
+
+```java
+/**
+ * Samples for Operations List.
+ */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: 2024-12-01-preview/ListConnectedClusterOperationsExample.json
+ */
+ /**
+ * Sample code: ListConnectedClusterOperationsExample.
+ *
+ * @param manager Entry point to HybridkubernetesManager.
+ */
+ public static void listConnectedClusterOperationsExample(
+ com.azure.resourcemanager.hybridkubernetes.HybridkubernetesManager manager) {
+ manager.operations().list(com.azure.core.util.Context.NONE);
+ }
+}
+```
+
+### ConnectedClusters_Update
```java
import com.azure.resourcemanager.hybridkubernetes.models.AadProfile;
@@ -33,21 +236,19 @@ import java.util.HashMap;
import java.util.Map;
/**
- * Samples for ConnectedCluster CreateOrReplace.
+ * Samples for ConnectedClusters CreateOrReplace.
*/
-public final class ConnectedClusterCreateOrReplaceSamples {
+public final class ConnectedClustersCreateOrReplaceSamples {
/*
- * x-ms-original-file:
- * specification/hybridkubernetes/resource-manager/Microsoft.Kubernetes/preview/2024-12-01-preview/examples/
- * UpdateClusterByPutExample.json
+ * x-ms-original-file: 2024-12-01-preview/UpdateClusterByPutExample.json
*/
/**
* Sample code: UpdateClusterByPutExample.
*
- * @param manager Entry point to HybridKubernetesManager.
+ * @param manager Entry point to HybridkubernetesManager.
*/
public static void
- updateClusterByPutExample(com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager manager) {
+ updateClusterByPutExample(com.azure.resourcemanager.hybridkubernetes.HybridkubernetesManager manager) {
manager.connectedClusters()
.define("testCluster")
.withRegion("East US")
@@ -66,17 +267,15 @@ public final class ConnectedClusterCreateOrReplaceSamples {
}
/*
- * x-ms-original-file:
- * specification/hybridkubernetes/resource-manager/Microsoft.Kubernetes/preview/2024-12-01-preview/examples/
- * CreateCluster_KindExample.json
+ * x-ms-original-file: 2024-12-01-preview/CreateCluster_KindExample.json
*/
/**
* Sample code: CreateCluster_KindExample.
*
- * @param manager Entry point to HybridKubernetesManager.
+ * @param manager Entry point to HybridkubernetesManager.
*/
public static void
- createClusterKindExample(com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager manager) {
+ createClusterKindExample(com.azure.resourcemanager.hybridkubernetes.HybridkubernetesManager manager) {
manager.connectedClusters()
.define("testCluster")
.withRegion("East US")
@@ -88,9 +287,9 @@ public final class ConnectedClusterCreateOrReplaceSamples {
.withDistribution("AKS")
.withDistributionVersion("1.0")
.withAzureHybridBenefit(AzureHybridBenefit.NOT_APPLICABLE)
- .withAadProfile(new AadProfile().withEnableAzureRbac(true)
+ .withAadProfile(new AadProfile().withEnableAzureRBAC(true)
.withAdminGroupObjectIDs(Arrays.asList("56f988bf-86f1-41af-91ab-2d7cd011db47"))
- .withTenantId("82f988bf-86f1-41af-91ab-2d7cd011db47"))
+ .withTenantID("82f988bf-86f1-41af-91ab-2d7cd011db47"))
.withArcAgentProfile(new ArcAgentProfile().withDesiredAgentVersion("0.1.0")
.withAgentAutoUpgrade(AutoUpgradeOptions.ENABLED)
.withSystemComponents(Arrays.asList(
@@ -100,17 +299,15 @@ public final class ConnectedClusterCreateOrReplaceSamples {
}
/*
- * x-ms-original-file:
- * specification/hybridkubernetes/resource-manager/Microsoft.Kubernetes/preview/2024-12-01-preview/examples/
- * CreateClusterExample.json
+ * x-ms-original-file: 2024-12-01-preview/CreateClusterExample.json
*/
/**
* Sample code: CreateClusterExample.
*
- * @param manager Entry point to HybridKubernetesManager.
+ * @param manager Entry point to HybridkubernetesManager.
*/
public static void
- createClusterExample(com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager manager) {
+ createClusterExample(com.azure.resourcemanager.hybridkubernetes.HybridkubernetesManager manager) {
manager.connectedClusters()
.define("testCluster")
.withRegion("East US")
@@ -126,17 +323,15 @@ public final class ConnectedClusterCreateOrReplaceSamples {
}
/*
- * x-ms-original-file:
- * specification/hybridkubernetes/resource-manager/Microsoft.Kubernetes/preview/2024-12-01-preview/examples/
- * CreateClusterPrivateLinkExample.json
+ * x-ms-original-file: 2024-12-01-preview/CreateClusterPrivateLinkExample.json
*/
/**
* Sample code: CreateClusterPrivateLinkExample.
*
- * @param manager Entry point to HybridKubernetesManager.
+ * @param manager Entry point to HybridkubernetesManager.
*/
public static void
- createClusterPrivateLinkExample(com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager manager) {
+ createClusterPrivateLinkExample(com.azure.resourcemanager.hybridkubernetes.HybridkubernetesManager manager) {
manager.connectedClusters()
.define("testCluster")
.withRegion("East US")
@@ -155,17 +350,15 @@ public final class ConnectedClusterCreateOrReplaceSamples {
}
/*
- * x-ms-original-file:
- * specification/hybridkubernetes/resource-manager/Microsoft.Kubernetes/preview/2024-12-01-preview/examples/
- * CreateClusterAgentless_KindAWSExample.json
+ * x-ms-original-file: 2024-12-01-preview/CreateClusterAgentless_KindAWSExample.json
*/
/**
* Sample code: CreateClusterAgentless_KindAWSExample.
*
- * @param manager Entry point to HybridKubernetesManager.
+ * @param manager Entry point to HybridkubernetesManager.
*/
public static void createClusterAgentlessKindAWSExample(
- com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager manager) {
+ com.azure.resourcemanager.hybridkubernetes.HybridkubernetesManager manager) {
manager.connectedClusters()
.define("testCluster")
.withRegion("East US")
@@ -193,206 +386,7 @@ public final class ConnectedClusterCreateOrReplaceSamples {
}
```
-### ConnectedCluster_Delete
-
-```java
-/**
- * Samples for ConnectedCluster Delete.
- */
-public final class ConnectedClusterDeleteSamples {
- /*
- * x-ms-original-file:
- * specification/hybridkubernetes/resource-manager/Microsoft.Kubernetes/preview/2024-12-01-preview/examples/
- * DeleteClusterExample.json
- */
- /**
- * Sample code: DeleteClusterExample.
- *
- * @param manager Entry point to HybridKubernetesManager.
- */
- public static void
- deleteClusterExample(com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager manager) {
- manager.connectedClusters().delete("k8sc-rg", "testCluster", com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### ConnectedCluster_GetByResourceGroup
-
-```java
-/**
- * Samples for ConnectedCluster GetByResourceGroup.
- */
-public final class ConnectedClusterGetByResourceGroupSamples {
- /*
- * x-ms-original-file:
- * specification/hybridkubernetes/resource-manager/Microsoft.Kubernetes/preview/2024-12-01-preview/examples/
- * GetProvisionedClusterExample.json
- */
- /**
- * Sample code: GetProvisionedClusterExample.
- *
- * @param manager Entry point to HybridKubernetesManager.
- */
- public static void
- getProvisionedClusterExample(com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager manager) {
- manager.connectedClusters()
- .getByResourceGroupWithResponse("k8sc-rg", "testCluster", com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file:
- * specification/hybridkubernetes/resource-manager/Microsoft.Kubernetes/preview/2024-12-01-preview/examples/
- * GetClusterExample.json
- */
- /**
- * Sample code: GetClusterExample.
- *
- * @param manager Entry point to HybridKubernetesManager.
- */
- public static void getClusterExample(com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager manager) {
- manager.connectedClusters()
- .getByResourceGroupWithResponse("k8sc-rg", "testCluster", com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### ConnectedCluster_List
-
-```java
-/**
- * Samples for ConnectedCluster List.
- */
-public final class ConnectedClusterListSamples {
- /*
- * x-ms-original-file:
- * specification/hybridkubernetes/resource-manager/Microsoft.Kubernetes/preview/2024-12-01-preview/examples/
- * GetClustersBySubscriptionExample.json
- */
- /**
- * Sample code: GetClustersBySubscriptionExample.
- *
- * @param manager Entry point to HybridKubernetesManager.
- */
- public static void
- getClustersBySubscriptionExample(com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager manager) {
- manager.connectedClusters().list(com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### ConnectedCluster_ListByResourceGroup
-
-```java
-/**
- * Samples for ConnectedCluster ListByResourceGroup.
- */
-public final class ConnectedClusterListByResourceGroupSamples {
- /*
- * x-ms-original-file:
- * specification/hybridkubernetes/resource-manager/Microsoft.Kubernetes/preview/2024-12-01-preview/examples/
- * GetClustersByResourceGroupExample.json
- */
- /**
- * Sample code: GetClustersExample.
- *
- * @param manager Entry point to HybridKubernetesManager.
- */
- public static void getClustersExample(com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager manager) {
- manager.connectedClusters().listByResourceGroup("k8sc-rg", com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### ConnectedCluster_ListClusterUserCredential
-
-```java
-import com.azure.resourcemanager.hybridkubernetes.models.AuthenticationMethod;
-import com.azure.resourcemanager.hybridkubernetes.models.ListClusterUserCredentialProperties;
-
-/**
- * Samples for ConnectedCluster ListClusterUserCredential.
- */
-public final class ConnectedClusterListClusterUserCredentialSamples {
- /*
- * x-ms-original-file:
- * specification/hybridkubernetes/resource-manager/Microsoft.Kubernetes/preview/2024-12-01-preview/examples/
- * ConnectedClustersListClusterCredentialResultCSPAAD.json
- */
- /**
- * Sample code: ListClusterUserCredentialExample.
- *
- * @param manager Entry point to HybridKubernetesManager.
- */
- public static void
- listClusterUserCredentialExample(com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager manager) {
- manager.connectedClusters()
- .listClusterUserCredentialWithResponse("k8sc-rg", "testCluster",
- new ListClusterUserCredentialProperties().withAuthenticationMethod(AuthenticationMethod.AAD)
- .withClientProxy(true),
- com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file:
- * specification/hybridkubernetes/resource-manager/Microsoft.Kubernetes/preview/2024-12-01-preview/examples/
- * ConnectedClustersListClusterCredentialResultHPAAD.json
- */
- /**
- * Sample code: ListClusterUserCredentialCSPExample.
- *
- * @param manager Entry point to HybridKubernetesManager.
- */
- public static void listClusterUserCredentialCSPExample(
- com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager manager) {
- manager.connectedClusters()
- .listClusterUserCredentialWithResponse("k8sc-rg", "testCluster",
- new ListClusterUserCredentialProperties().withAuthenticationMethod(AuthenticationMethod.AAD)
- .withClientProxy(false),
- com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file:
- * specification/hybridkubernetes/resource-manager/Microsoft.Kubernetes/preview/2024-12-01-preview/examples/
- * ConnectedClustersListClusterCredentialResultCSPToken.json
- */
- /**
- * Sample code: ListClusterUserCredentialNonAadExample.
- *
- * @param manager Entry point to HybridKubernetesManager.
- */
- public static void listClusterUserCredentialNonAadExample(
- com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager manager) {
- manager.connectedClusters()
- .listClusterUserCredentialWithResponse("k8sc-rg", "testCluster",
- new ListClusterUserCredentialProperties().withAuthenticationMethod(AuthenticationMethod.TOKEN)
- .withClientProxy(true),
- com.azure.core.util.Context.NONE);
- }
-
- /*
- * x-ms-original-file:
- * specification/hybridkubernetes/resource-manager/Microsoft.Kubernetes/preview/2024-12-01-preview/examples/
- * ConnectedClustersListClusterCredentialResultHPToken.json
- */
- /**
- * Sample code: ListClusterUserCredentialNonAadCSPExample.
- *
- * @param manager Entry point to HybridKubernetesManager.
- */
- public static void listClusterUserCredentialNonAadCSPExample(
- com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager manager) {
- manager.connectedClusters()
- .listClusterUserCredentialWithResponse("k8sc-rg", "testCluster",
- new ListClusterUserCredentialProperties().withAuthenticationMethod(AuthenticationMethod.TOKEN)
- .withClientProxy(false),
- com.azure.core.util.Context.NONE);
- }
-}
-```
-
-### ConnectedCluster_Update
+### Operations_List
```java
import com.azure.resourcemanager.hybridkubernetes.models.AzureHybridBenefit;
@@ -401,21 +395,19 @@ import java.util.HashMap;
import java.util.Map;
/**
- * Samples for ConnectedCluster Update.
+ * Samples for ConnectedClusters Update.
*/
-public final class ConnectedClusterUpdateSamples {
+public final class ConnectedClustersUpdateSamples {
/*
- * x-ms-original-file:
- * specification/hybridkubernetes/resource-manager/Microsoft.Kubernetes/preview/2024-12-01-preview/examples/
- * UpdateClusterByPatchExample.json
+ * x-ms-original-file: 2024-12-01-preview/UpdateClusterByPatchExample.json
*/
/**
* Sample code: UpdateClusterExample.
*
- * @param manager Entry point to HybridKubernetesManager.
+ * @param manager Entry point to HybridkubernetesManager.
*/
public static void
- updateClusterExample(com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager manager) {
+ updateClusterExample(com.azure.resourcemanager.hybridkubernetes.HybridkubernetesManager manager) {
ConnectedCluster resource = manager.connectedClusters()
.getByResourceGroupWithResponse("k8sc-rg", "testCluster", com.azure.core.util.Context.NONE)
.getValue();
@@ -441,27 +433,3 @@ public final class ConnectedClusterUpdateSamples {
}
```
-### Operations_Get
-
-```java
-/**
- * Samples for Operations Get.
- */
-public final class OperationsGetSamples {
- /*
- * x-ms-original-file:
- * specification/hybridkubernetes/resource-manager/Microsoft.Kubernetes/preview/2024-12-01-preview/examples/
- * ListConnectedClusterOperationsExample.json
- */
- /**
- * Sample code: ListConnectedClusterOperationsExample.
- *
- * @param manager Entry point to HybridKubernetesManager.
- */
- public static void listConnectedClusterOperationsExample(
- com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager manager) {
- manager.operations().get(com.azure.core.util.Context.NONE);
- }
-}
-```
-
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/pom.xml b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/pom.xml
index 057893a7ef67..003ca6742ccd 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/pom.xml
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/pom.xml
@@ -1,7 +1,7 @@
4.0.0
@@ -17,8 +17,8 @@
1.1.0-beta.2
jar
- Microsoft Azure SDK for HybridKubernetes Management
- This package contains Microsoft Azure SDK for HybridKubernetes Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Hybrid Kubernetes Client. Package tag package-2024-12-01-preview.
+ Microsoft Azure SDK for Hybridkubernetes Management
+ This package contains Microsoft Azure SDK for Hybridkubernetes Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Connected Cluster Resource Provider API for onboarding a Kubernetes Cluster to Azure Arc.
https://github.com/Azure/azure-sdk-for-java
@@ -46,7 +46,6 @@
0
0
true
- false
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/HybridKubernetesManager.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/HybridkubernetesManager.java
similarity index 87%
rename from sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/HybridKubernetesManager.java
rename to sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/HybridkubernetesManager.java
index aab8020157ad..caed1143ff5c 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/HybridKubernetesManager.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/HybridkubernetesManager.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.hybridkubernetes;
@@ -24,9 +24,9 @@
import com.azure.core.util.Configuration;
import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
-import com.azure.resourcemanager.hybridkubernetes.fluent.HybridKubernetesManagementClient;
+import com.azure.resourcemanager.hybridkubernetes.fluent.KubernetesClient;
import com.azure.resourcemanager.hybridkubernetes.implementation.ConnectedClustersImpl;
-import com.azure.resourcemanager.hybridkubernetes.implementation.HybridKubernetesManagementClientBuilder;
+import com.azure.resourcemanager.hybridkubernetes.implementation.KubernetesClientBuilder;
import com.azure.resourcemanager.hybridkubernetes.implementation.OperationsImpl;
import com.azure.resourcemanager.hybridkubernetes.models.ConnectedClusters;
import com.azure.resourcemanager.hybridkubernetes.models.Operations;
@@ -39,20 +39,20 @@
import java.util.stream.Collectors;
/**
- * Entry point to HybridKubernetesManager.
- * Hybrid Kubernetes Client.
+ * Entry point to HybridkubernetesManager.
+ * Azure Connected Cluster Resource Provider API for onboarding a Kubernetes Cluster to Azure Arc.
*/
-public final class HybridKubernetesManager {
- private ConnectedClusters connectedClusters;
-
+public final class HybridkubernetesManager {
private Operations operations;
- private final HybridKubernetesManagementClient clientObject;
+ private ConnectedClusters connectedClusters;
+
+ private final KubernetesClient clientObject;
- private HybridKubernetesManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
+ private HybridkubernetesManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
- this.clientObject = new HybridKubernetesManagementClientBuilder().pipeline(httpPipeline)
+ this.clientObject = new KubernetesClientBuilder().pipeline(httpPipeline)
.endpoint(profile.getEnvironment().getResourceManagerEndpoint())
.subscriptionId(profile.getSubscriptionId())
.defaultPollInterval(defaultPollInterval)
@@ -60,38 +60,38 @@ private HybridKubernetesManager(HttpPipeline httpPipeline, AzureProfile profile,
}
/**
- * Creates an instance of HybridKubernetes service API entry point.
+ * Creates an instance of Hybridkubernetes service API entry point.
*
* @param credential the credential to use.
* @param profile the Azure profile for client.
- * @return the HybridKubernetes service API instance.
+ * @return the Hybridkubernetes service API instance.
*/
- public static HybridKubernetesManager authenticate(TokenCredential credential, AzureProfile profile) {
+ public static HybridkubernetesManager authenticate(TokenCredential credential, AzureProfile profile) {
Objects.requireNonNull(credential, "'credential' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
return configure().authenticate(credential, profile);
}
/**
- * Creates an instance of HybridKubernetes service API entry point.
+ * Creates an instance of Hybridkubernetes service API entry point.
*
* @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential.
* @param profile the Azure profile for client.
- * @return the HybridKubernetes service API instance.
+ * @return the Hybridkubernetes service API instance.
*/
- public static HybridKubernetesManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
+ public static HybridkubernetesManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) {
Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
- return new HybridKubernetesManager(httpPipeline, profile, null);
+ return new HybridkubernetesManager(httpPipeline, profile, null);
}
/**
- * Gets a Configurable instance that can be used to create HybridKubernetesManager with optional configuration.
+ * Gets a Configurable instance that can be used to create HybridkubernetesManager with optional configuration.
*
* @return the Configurable instance allowing configurations.
*/
public static Configurable configure() {
- return new HybridKubernetesManager.Configurable();
+ return new HybridkubernetesManager.Configurable();
}
/**
@@ -199,13 +199,13 @@ public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
}
/**
- * Creates an instance of HybridKubernetes service API entry point.
+ * Creates an instance of Hybridkubernetes service API entry point.
*
* @param credential the credential to use.
* @param profile the Azure profile for client.
- * @return the HybridKubernetes service API instance.
+ * @return the Hybridkubernetes service API instance.
*/
- public HybridKubernetesManager authenticate(TokenCredential credential, AzureProfile profile) {
+ public HybridkubernetesManager authenticate(TokenCredential credential, AzureProfile profile) {
Objects.requireNonNull(credential, "'credential' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
@@ -258,20 +258,8 @@ public HybridKubernetesManager authenticate(TokenCredential credential, AzurePro
HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient)
.policies(policies.toArray(new HttpPipelinePolicy[0]))
.build();
- return new HybridKubernetesManager(httpPipeline, profile, defaultPollInterval);
- }
- }
-
- /**
- * Gets the resource collection API of ConnectedClusters. It manages ConnectedCluster.
- *
- * @return Resource collection API of ConnectedClusters.
- */
- public ConnectedClusters connectedClusters() {
- if (this.connectedClusters == null) {
- this.connectedClusters = new ConnectedClustersImpl(clientObject.getConnectedClusters(), this);
+ return new HybridkubernetesManager(httpPipeline, profile, defaultPollInterval);
}
- return connectedClusters;
}
/**
@@ -287,12 +275,24 @@ public Operations operations() {
}
/**
- * Gets wrapped service client HybridKubernetesManagementClient providing direct access to the underlying
- * auto-generated API implementation, based on Azure REST API.
+ * Gets the resource collection API of ConnectedClusters. It manages ConnectedCluster.
+ *
+ * @return Resource collection API of ConnectedClusters.
+ */
+ public ConnectedClusters connectedClusters() {
+ if (this.connectedClusters == null) {
+ this.connectedClusters = new ConnectedClustersImpl(clientObject.getConnectedClusters(), this);
+ }
+ return connectedClusters;
+ }
+
+ /**
+ * Gets wrapped service client KubernetesClient providing direct access to the underlying auto-generated API
+ * implementation, based on Azure REST API.
*
- * @return Wrapped service client HybridKubernetesManagementClient.
+ * @return Wrapped service client KubernetesClient.
*/
- public HybridKubernetesManagementClient serviceClient() {
+ public KubernetesClient serviceClient() {
return this.clientObject;
}
}
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/ConnectedClustersClient.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/ConnectedClustersClient.java
index 08ab800fa896..7f02bde5dcaf 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/ConnectedClustersClient.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/ConnectedClustersClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.hybridkubernetes.fluent;
@@ -20,6 +20,46 @@
* An instance of this class provides access to all the operations defined in ConnectedClustersClient.
*/
public interface ConnectedClustersClient {
+ /**
+ * Get the properties of the specified connected cluster.
+ *
+ * Returns the properties of the specified connected cluster, including name, identity, properties, and additional
+ * cluster details.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the Kubernetes cluster on which get is called.
+ * @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 properties of the specified connected cluster.
+ *
+ * Returns the properties of the specified connected cluster, including name, identity, properties, and additional
+ * cluster details along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName,
+ Context context);
+
+ /**
+ * Get the properties of the specified connected cluster.
+ *
+ * Returns the properties of the specified connected cluster, including name, identity, properties, and additional
+ * cluster details.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the Kubernetes cluster on which get is called.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the properties of the specified connected cluster.
+ *
+ * Returns the properties of the specified connected cluster, including name, identity, properties, and additional
+ * cluster details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ ConnectedClusterInner getByResourceGroup(String resourceGroupName, String clusterName);
+
/**
* Register a new Kubernetes cluster with Azure Resource Manager.
*
@@ -129,40 +169,6 @@ Response updateWithResponse(String resourceGroupName, Str
ConnectedClusterInner update(String resourceGroupName, String clusterName,
ConnectedClusterPatch connectedClusterPatch);
- /**
- * Get the properties of the specified connected cluster.
- *
- * Returns the properties of the specified connected cluster, including name, identity, properties, and additional
- * cluster details.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param clusterName The name of the Kubernetes cluster on which get is called.
- * @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 represents a connected cluster along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName,
- Context context);
-
- /**
- * Get the properties of the specified connected cluster.
- *
- * Returns the properties of the specified connected cluster, including name, identity, properties, and additional
- * cluster details.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param clusterName The name of the Kubernetes cluster on which get is called.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a connected cluster.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- ConnectedClusterInner getByResourceGroup(String resourceGroupName, String clusterName);
-
/**
* Delete a connected cluster.
*
@@ -224,43 +230,7 @@ Response getByResourceGroupWithResponse(String resourceGr
void delete(String resourceGroupName, String clusterName, Context context);
/**
- * Gets cluster user credentials of a connected cluster
- *
- * Gets cluster user credentials of the connected cluster with a specified resource group and name.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param clusterName The name of the Kubernetes cluster on which get is called.
- * @param properties ListClusterUserCredential properties.
- * @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 cluster user credentials of the connected cluster with a specified resource group and name along with
- * {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- Response listClusterUserCredentialWithResponse(String resourceGroupName, String clusterName,
- ListClusterUserCredentialProperties properties, Context context);
-
- /**
- * Gets cluster user credentials of a connected cluster
- *
- * Gets cluster user credentials of the connected cluster with a specified resource group and name.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param clusterName The name of the Kubernetes cluster on which get is called.
- * @param properties ListClusterUserCredential properties.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return cluster user credentials of the connected cluster with a specified resource group and name.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- CredentialResultsInner listClusterUserCredential(String resourceGroupName, String clusterName,
- ListClusterUserCredentialProperties properties);
-
- /**
- * Lists all connected clusters in the given ResourceGroup
+ * Lists all connected clusters in the given Resource Group
*
* API to enumerate registered connected K8s clusters under a Resource Group.
*
@@ -274,7 +244,7 @@ CredentialResultsInner listClusterUserCredential(String resourceGroupName, Strin
PagedIterable listByResourceGroup(String resourceGroupName);
/**
- * Lists all connected clusters in the given ResourceGroup
+ * Lists all connected clusters in the given Resource Group
*
* API to enumerate registered connected K8s clusters under a Resource Group.
*
@@ -313,4 +283,44 @@ CredentialResultsInner listClusterUserCredential(String resourceGroupName, Strin
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
+
+ /**
+ * Gets cluster user credentials of a connected cluster
+ *
+ * Gets cluster user credentials of the connected cluster with a specified resource group and name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the Kubernetes cluster on which get is called.
+ * @param properties ListClusterUserCredential properties.
+ * @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 cluster user credentials of a connected cluster
+ *
+ * Gets cluster user credentials of the connected cluster with a specified resource group and name along with
+ * {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listClusterUserCredentialWithResponse(String resourceGroupName, String clusterName,
+ ListClusterUserCredentialProperties properties, Context context);
+
+ /**
+ * Gets cluster user credentials of a connected cluster
+ *
+ * Gets cluster user credentials of the connected cluster with a specified resource group and name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the Kubernetes cluster on which get is called.
+ * @param properties ListClusterUserCredential properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cluster user credentials of a connected cluster
+ *
+ * Gets cluster user credentials of the connected cluster with a specified resource group and name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CredentialResultsInner listClusterUserCredential(String resourceGroupName, String clusterName,
+ ListClusterUserCredentialProperties properties);
}
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/HybridKubernetesManagementClient.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/KubernetesClient.java
similarity index 81%
rename from sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/HybridKubernetesManagementClient.java
rename to sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/KubernetesClient.java
index b36583492c0e..9030b97d9aa0 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/HybridKubernetesManagementClient.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/KubernetesClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.hybridkubernetes.fluent;
@@ -8,30 +8,30 @@
import java.time.Duration;
/**
- * The interface for HybridKubernetesManagementClient class.
+ * The interface for KubernetesClient class.
*/
-public interface HybridKubernetesManagementClient {
+public interface KubernetesClient {
/**
- * Gets The ID of the target subscription.
- *
- * @return the subscriptionId value.
- */
- String getSubscriptionId();
-
- /**
- * Gets server parameter.
+ * Gets Service host.
*
* @return the endpoint value.
*/
String getEndpoint();
/**
- * Gets Api Version.
+ * Gets Version parameter.
*
* @return the apiVersion value.
*/
String getApiVersion();
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
/**
* Gets The HTTP pipeline to send requests through.
*
@@ -47,16 +47,16 @@ public interface HybridKubernetesManagementClient {
Duration getDefaultPollInterval();
/**
- * Gets the ConnectedClustersClient object to access its operations.
+ * Gets the OperationsClient object to access its operations.
*
- * @return the ConnectedClustersClient object.
+ * @return the OperationsClient object.
*/
- ConnectedClustersClient getConnectedClusters();
+ OperationsClient getOperations();
/**
- * Gets the OperationsClient object to access its operations.
+ * Gets the ConnectedClustersClient object to access its operations.
*
- * @return the OperationsClient object.
+ * @return the ConnectedClustersClient object.
*/
- OperationsClient getOperations();
+ ConnectedClustersClient getConnectedClusters();
}
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/OperationsClient.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/OperationsClient.java
index 01a77b14e388..5741fe808fb1 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/OperationsClient.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/OperationsClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.hybridkubernetes.fluent;
@@ -15,17 +15,17 @@
*/
public interface OperationsClient {
/**
- * Lists all of the available API operations for Connected Cluster resource.
+ * List the operations for the provider.
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the paginated list of connected cluster API operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable get();
+ PagedIterable list();
/**
- * Lists all of the available API operations for Connected Cluster resource.
+ * List the operations for the provider.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -34,5 +34,5 @@ public interface OperationsClient {
* @return the paginated list of connected cluster API operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- PagedIterable get(Context context);
+ PagedIterable list(Context context);
}
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/models/ConnectedClusterInner.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/models/ConnectedClusterInner.java
index c8ecdc9f0747..5859b3faef1b 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/models/ConnectedClusterInner.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/models/ConnectedClusterInner.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.hybridkubernetes.fluent.models;
@@ -49,7 +49,7 @@ public final class ConnectedClusterInner extends Resource {
private ConnectedClusterProperties innerProperties = new ConnectedClusterProperties();
/*
- * Metadata pertaining to creation and last modification of the resource
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
private SystemData systemData;
@@ -124,7 +124,7 @@ private ConnectedClusterProperties innerProperties() {
}
/**
- * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
* @return the systemData value.
*/
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/models/ConnectedClusterPatchProperties.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/models/ConnectedClusterPatchProperties.java
index e6575233c846..17062c1ff3a9 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/models/ConnectedClusterPatchProperties.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/models/ConnectedClusterPatchProperties.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.hybridkubernetes.fluent.models;
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/models/ConnectedClusterProperties.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/models/ConnectedClusterProperties.java
index 74e637226ace..029bab60c9de 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/models/ConnectedClusterProperties.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/models/ConnectedClusterProperties.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.hybridkubernetes.fluent.models;
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/models/CredentialResultsInner.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/models/CredentialResultsInner.java
index 549e65effdcb..6518d66be955 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/models/CredentialResultsInner.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/models/CredentialResultsInner.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.hybridkubernetes.fluent.models;
@@ -32,7 +32,7 @@ public final class CredentialResultsInner implements JsonSerializable {
/*
- * Operation name: {Microsoft.Kubernetes}/{resource}/{operation}
+ * The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action"
*/
private String name;
/*
- * The object that represents the operation.
+ * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure
+ * Resource Manager/control-plane operations.
+ */
+ private Boolean isDataAction;
+
+ /*
+ * Localized display information for this particular operation.
*/
private OperationDisplay display;
+ /*
+ * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
+ * value is "user,system"
+ */
+ private Origin origin;
+
+ /*
+ * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ */
+ private ActionType actionType;
+
/**
* Creates an instance of OperationInner class.
*/
- public OperationInner() {
+ private OperationInner() {
}
/**
- * Get the name property: Operation name: {Microsoft.Kubernetes}/{resource}/{operation}.
+ * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action".
*
* @return the name value.
*/
@@ -43,7 +66,17 @@ public String name() {
}
/**
- * Get the display property: The object that represents the operation.
+ * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane
+ * operations and "false" for Azure Resource Manager/control-plane operations.
+ *
+ * @return the isDataAction value.
+ */
+ public Boolean isDataAction() {
+ return this.isDataAction;
+ }
+
+ /**
+ * Get the display property: Localized display information for this particular operation.
*
* @return the display value.
*/
@@ -51,6 +84,26 @@ public OperationDisplay display() {
return this.display;
}
+ /**
+ * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and
+ * audit logs UX. Default value is "user,system".
+ *
+ * @return the origin value.
+ */
+ public Origin origin() {
+ return this.origin;
+ }
+
+ /**
+ * Get the actionType property: Extensible enum. Indicates the action type. "Internal" refers to actions that are
+ * for internal only APIs.
+ *
+ * @return the actionType value.
+ */
+ public ActionType actionType() {
+ return this.actionType;
+ }
+
/**
* Validates the instance.
*
@@ -68,6 +121,7 @@ public void validate() {
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("display", this.display);
return jsonWriter.writeEndObject();
}
@@ -88,8 +142,14 @@ public static OperationInner fromJson(JsonReader jsonReader) throws IOException
if ("name".equals(fieldName)) {
deserializedOperationInner.name = reader.getString();
+ } else if ("isDataAction".equals(fieldName)) {
+ deserializedOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean);
} else if ("display".equals(fieldName)) {
deserializedOperationInner.display = OperationDisplay.fromJson(reader);
+ } else if ("origin".equals(fieldName)) {
+ deserializedOperationInner.origin = Origin.fromString(reader.getString());
+ } else if ("actionType".equals(fieldName)) {
+ deserializedOperationInner.actionType = ActionType.fromString(reader.getString());
} else {
reader.skipChildren();
}
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/models/package-info.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/models/package-info.java
index 036fc43e4718..cb37ceb12f79 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/models/package-info.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/models/package-info.java
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
/**
- * Package containing the inner data models for HybridKubernetesManagementClient.
- * Hybrid Kubernetes Client.
+ * Package containing the inner data models for Hybridkubernetes.
+ * Azure Connected Cluster Resource Provider API for onboarding a Kubernetes Cluster to Azure Arc.
*/
package com.azure.resourcemanager.hybridkubernetes.fluent.models;
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/package-info.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/package-info.java
index c6a3a99ae34b..e9d506a8ef3c 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/package-info.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/fluent/package-info.java
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
/**
- * Package containing the service clients for HybridKubernetesManagementClient.
- * Hybrid Kubernetes Client.
+ * Package containing the service clients for Hybridkubernetes.
+ * Azure Connected Cluster Resource Provider API for onboarding a Kubernetes Cluster to Azure Arc.
*/
package com.azure.resourcemanager.hybridkubernetes.fluent;
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/ConnectedClusterImpl.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/ConnectedClusterImpl.java
index a6d9dda466eb..6c4f4c4437c9 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/ConnectedClusterImpl.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/ConnectedClusterImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.hybridkubernetes.implementation;
@@ -34,7 +34,7 @@ public final class ConnectedClusterImpl
implements ConnectedCluster, ConnectedCluster.Definition, ConnectedCluster.Update {
private ConnectedClusterInner innerObject;
- private final com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager serviceManager;
+ private final com.azure.resourcemanager.hybridkubernetes.HybridkubernetesManager serviceManager;
public String id() {
return this.innerModel().id();
@@ -191,7 +191,7 @@ public ConnectedClusterInner innerModel() {
return this.innerObject;
}
- private com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager manager() {
+ private com.azure.resourcemanager.hybridkubernetes.HybridkubernetesManager manager() {
return this.serviceManager;
}
@@ -221,7 +221,7 @@ public ConnectedCluster create(Context context) {
}
ConnectedClusterImpl(String name,
- com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager serviceManager) {
+ com.azure.resourcemanager.hybridkubernetes.HybridkubernetesManager serviceManager) {
this.innerObject = new ConnectedClusterInner();
this.serviceManager = serviceManager;
this.clusterName = name;
@@ -249,10 +249,10 @@ public ConnectedCluster apply(Context context) {
}
ConnectedClusterImpl(ConnectedClusterInner innerObject,
- com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager serviceManager) {
+ com.azure.resourcemanager.hybridkubernetes.HybridkubernetesManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
- this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourcegroups");
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "connectedClusters");
}
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/ConnectedClustersClientImpl.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/ConnectedClustersClientImpl.java
index e13d14c6b4c9..bb08ff5d3f6e 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/ConnectedClustersClientImpl.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/ConnectedClustersClientImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.hybridkubernetes.implementation;
@@ -29,14 +29,16 @@
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.BinaryData;
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.hybridkubernetes.fluent.ConnectedClustersClient;
import com.azure.resourcemanager.hybridkubernetes.fluent.models.ConnectedClusterInner;
import com.azure.resourcemanager.hybridkubernetes.fluent.models.CredentialResultsInner;
-import com.azure.resourcemanager.hybridkubernetes.models.ConnectedClusterList;
+import com.azure.resourcemanager.hybridkubernetes.implementation.models.ConnectedClusterList;
import com.azure.resourcemanager.hybridkubernetes.models.ConnectedClusterPatch;
import com.azure.resourcemanager.hybridkubernetes.models.ListClusterUserCredentialProperties;
import java.nio.ByteBuffer;
@@ -55,79 +57,112 @@ public final class ConnectedClustersClientImpl implements ConnectedClustersClien
/**
* The service client containing this operation class.
*/
- private final HybridKubernetesManagementClientImpl client;
+ private final KubernetesClientImpl client;
/**
* Initializes an instance of ConnectedClustersClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- ConnectedClustersClientImpl(HybridKubernetesManagementClientImpl client) {
+ ConnectedClustersClientImpl(KubernetesClientImpl client) {
this.service
= RestProxy.create(ConnectedClustersService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for HybridKubernetesManagementClientConnectedClusters to be used by the
- * proxy service to perform REST calls.
+ * The interface defining all the services for KubernetesClientConnectedClusters to be used by the proxy service to
+ * perform REST calls.
*/
- @Host("{$host}")
- @ServiceInterface(name = "HybridKubernetesMana")
+ @Host("{endpoint}")
+ @ServiceInterface(name = "KubernetesClientConn")
public interface ConnectedClustersService {
@Headers({ "Content-Type: application/json" })
- @Put("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}")
- @ExpectedResponses({ 200, 201 })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}")
+ @ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> createOrReplace(@HostParam("$host") String endpoint,
+ Mono> getByResourceGroup(@HostParam("endpoint") String endpoint,
@QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName,
- @BodyParam("application/json") ConnectedClusterInner connectedCluster, @HeaderParam("Accept") String accept,
- Context context);
+ @HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
- @Patch("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}")
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> update(@HostParam("$host") String endpoint,
+ Response getByResourceGroupSync(@HostParam("endpoint") String endpoint,
@QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName,
- @BodyParam("application/json") ConnectedClusterPatch connectedClusterPatch,
@HeaderParam("Accept") String accept, Context context);
- @Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}")
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrReplace(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") ConnectedClusterInner connectedCluster, Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response createOrReplaceSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") ConnectedClusterInner connectedCluster, Context context);
+
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> getByResourceGroup(@HostParam("$host") String endpoint,
+ Mono> update(@HostParam("endpoint") String endpoint,
@QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName,
- @HeaderParam("Accept") String accept, Context context);
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") ConnectedClusterPatch connectedClusterPatch, Context context);
+
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response updateSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") ConnectedClusterPatch connectedClusterPatch, Context context);
@Headers({ "Content-Type: application/json" })
- @Delete("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}")
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}")
@ExpectedResponses({ 200, 202, 204 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono>> delete(@HostParam("$host") String endpoint,
+ Mono>> delete(@HostParam("endpoint") String endpoint,
@QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName,
@HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
- @Post("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}/listClusterUserCredential")
- @ExpectedResponses({ 200 })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}")
+ @ExpectedResponses({ 200, 202, 204 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listClusterUserCredential(@HostParam("$host") String endpoint,
+ Response deleteSync(@HostParam("endpoint") String endpoint,
@QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName,
- @BodyParam("application/json") ListClusterUserCredentialProperties properties,
@HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
- @Get("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters")
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> listByResourceGroup(@HostParam("$host") String endpoint,
+ Response listByResourceGroupSync(@HostParam("endpoint") String endpoint,
@QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept,
Context context);
@@ -136,16 +171,50 @@ Mono> listByResourceGroup(@HostParam("$host") Str
@Get("/subscriptions/{subscriptionId}/providers/Microsoft.Kubernetes/connectedClusters")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> list(@HostParam("$host") String endpoint,
- @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion,
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Kubernetes/connectedClusters")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
@HeaderParam("Accept") String accept, Context context);
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}/listClusterUserCredential")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listClusterUserCredential(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") ListClusterUserCredentialProperties properties, Context context);
+
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}/listClusterUserCredential")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listClusterUserCredentialSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("clusterName") String clusterName,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") ListClusterUserCredentialProperties properties, Context context);
+
@Headers({ "Content-Type: application/json" })
@Get("{nextLink}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listByResourceGroupNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listByResourceGroupNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
@HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@@ -153,27 +222,37 @@ Mono> listByResourceGroupNext(
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
Mono> listBySubscriptionNext(
- @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listBySubscriptionNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
@HeaderParam("Accept") String accept, Context context);
}
/**
- * Register a new Kubernetes cluster with Azure Resource Manager.
+ * Get the properties of the specified connected cluster.
*
- * API to register a new Kubernetes cluster and create or replace a connected cluster tracked resource in Azure
- * Resource Manager (ARM).
+ * Returns the properties of the specified connected cluster, including name, identity, properties, and additional
+ * cluster details.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the Kubernetes cluster on which get is called.
- * @param connectedCluster Parameters supplied to Create a Connected 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 represents a connected cluster along with {@link Response} on successful completion of {@link Mono}.
+ * @return the properties of the specified connected cluster.
+ *
+ * Returns the properties of the specified connected cluster, including name, identity, properties, and additional
+ * cluster details along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> createOrReplaceWithResponseAsync(String resourceGroupName,
- String clusterName, ConnectedClusterInner connectedCluster) {
+ private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
+ String clusterName) {
if (this.client.getEndpoint() == null) {
return Mono.error(
new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
@@ -189,19 +268,99 @@ private Mono>> createOrReplaceWithResponseAsync(String
if (clusterName == null) {
return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
}
- if (connectedCluster == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter connectedCluster is required and cannot be null."));
- } else {
- connectedCluster.validate();
- }
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.createOrReplace(this.client.getEndpoint(), this.client.getApiVersion(),
- this.client.getSubscriptionId(), resourceGroupName, clusterName, connectedCluster, accept, context))
+ .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
+ /**
+ * Get the properties of the specified connected cluster.
+ *
+ * Returns the properties of the specified connected cluster, including name, identity, properties, and additional
+ * cluster details.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the Kubernetes cluster on which get is called.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the properties of the specified connected cluster.
+ *
+ * Returns the properties of the specified connected cluster, including name, identity, properties, and additional
+ * cluster details on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName, String clusterName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, clusterName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get the properties of the specified connected cluster.
+ *
+ * Returns the properties of the specified connected cluster, including name, identity, properties, and additional
+ * cluster details.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the Kubernetes cluster on which get is called.
+ * @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 properties of the specified connected cluster.
+ *
+ * Returns the properties of the specified connected cluster, including name, identity, properties, and additional
+ * cluster details along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context);
+ }
+
+ /**
+ * Get the properties of the specified connected cluster.
+ *
+ * Returns the properties of the specified connected cluster, including name, identity, properties, and additional
+ * cluster details.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the Kubernetes cluster on which get is called.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the properties of the specified connected cluster.
+ *
+ * Returns the properties of the specified connected cluster, including name, identity, properties, and additional
+ * cluster details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ConnectedClusterInner getByResourceGroup(String resourceGroupName, String clusterName) {
+ return getByResourceGroupWithResponse(resourceGroupName, clusterName, Context.NONE).getValue();
+ }
+
/**
* Register a new Kubernetes cluster with Azure Resource Manager.
*
@@ -211,7 +370,6 @@ private Mono>> createOrReplaceWithResponseAsync(String
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the Kubernetes cluster on which get is called.
* @param connectedCluster Parameters supplied to Create a Connected 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.
@@ -219,7 +377,7 @@ private Mono>> createOrReplaceWithResponseAsync(String
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createOrReplaceWithResponseAsync(String resourceGroupName,
- String clusterName, ConnectedClusterInner connectedCluster, Context context) {
+ String clusterName, ConnectedClusterInner connectedCluster) {
if (this.client.getEndpoint() == null) {
return Mono.error(
new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
@@ -241,10 +399,13 @@ private Mono>> createOrReplaceWithResponseAsync(String
} else {
connectedCluster.validate();
}
+ final String contentType = "application/json";
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.createOrReplace(this.client.getEndpoint(), this.client.getApiVersion(),
- this.client.getSubscriptionId(), resourceGroupName, clusterName, connectedCluster, accept, context);
+ return FluxUtil
+ .withContext(context -> service.createOrReplace(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, connectedCluster,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
@@ -259,16 +420,40 @@ private Mono>> createOrReplaceWithResponseAsync(String
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link PollerFlux} for polling of represents a connected cluster.
+ * @return represents a connected cluster along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, ConnectedClusterInner> beginCreateOrReplaceAsync(
- String resourceGroupName, String clusterName, ConnectedClusterInner connectedCluster) {
- Mono>> mono
- = createOrReplaceWithResponseAsync(resourceGroupName, clusterName, connectedCluster);
- return this.client.getLroResult(mono,
- this.client.getHttpPipeline(), ConnectedClusterInner.class, ConnectedClusterInner.class,
- this.client.getContext());
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response createOrReplaceWithResponse(String resourceGroupName, String clusterName,
+ ConnectedClusterInner connectedCluster) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (connectedCluster == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter connectedCluster is required and cannot be null."));
+ } else {
+ connectedCluster.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.createOrReplaceSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, connectedCluster,
+ Context.NONE);
}
/**
@@ -284,16 +469,40 @@ private PollerFlux, ConnectedClusterInner> beg
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link PollerFlux} for polling of represents a connected cluster.
+ * @return represents a connected cluster along with {@link Response}.
*/
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, ConnectedClusterInner> beginCreateOrReplaceAsync(
- String resourceGroupName, String clusterName, ConnectedClusterInner connectedCluster, Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono
- = createOrReplaceWithResponseAsync(resourceGroupName, clusterName, connectedCluster, context);
- return this.client.getLroResult(mono,
- this.client.getHttpPipeline(), ConnectedClusterInner.class, ConnectedClusterInner.class, context);
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response createOrReplaceWithResponse(String resourceGroupName, String clusterName,
+ ConnectedClusterInner connectedCluster, Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (connectedCluster == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter connectedCluster is required and cannot be null."));
+ } else {
+ connectedCluster.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.createOrReplaceSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, connectedCluster,
+ context);
}
/**
@@ -308,12 +517,16 @@ private PollerFlux, ConnectedClusterInner> beg
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link SyncPoller} for polling of represents a connected cluster.
+ * @return the {@link PollerFlux} for polling of represents a connected cluster.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, ConnectedClusterInner>
- beginCreateOrReplace(String resourceGroupName, String clusterName, ConnectedClusterInner connectedCluster) {
- return this.beginCreateOrReplaceAsync(resourceGroupName, clusterName, connectedCluster).getSyncPoller();
+ private PollerFlux, ConnectedClusterInner> beginCreateOrReplaceAsync(
+ String resourceGroupName, String clusterName, ConnectedClusterInner connectedCluster) {
+ Mono>> mono
+ = createOrReplaceWithResponseAsync(resourceGroupName, clusterName, connectedCluster);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), ConnectedClusterInner.class, ConnectedClusterInner.class,
+ this.client.getContext());
}
/**
@@ -325,17 +538,17 @@ private PollerFlux, ConnectedClusterInner> beg
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the Kubernetes cluster on which get is called.
* @param connectedCluster Parameters supplied to Create a Connected 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 {@link SyncPoller} for polling of represents a connected cluster.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public SyncPoller, ConnectedClusterInner> beginCreateOrReplace(
- String resourceGroupName, String clusterName, ConnectedClusterInner connectedCluster, Context context) {
- return this.beginCreateOrReplaceAsync(resourceGroupName, clusterName, connectedCluster, context)
- .getSyncPoller();
+ public SyncPoller, ConnectedClusterInner>
+ beginCreateOrReplace(String resourceGroupName, String clusterName, ConnectedClusterInner connectedCluster) {
+ Response response = createOrReplaceWithResponse(resourceGroupName, clusterName, connectedCluster);
+ return this.client.getLroResult(response,
+ ConnectedClusterInner.class, ConnectedClusterInner.class, Context.NONE);
}
/**
@@ -347,16 +560,19 @@ public SyncPoller, ConnectedClusterInner> begi
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the Kubernetes cluster on which get is called.
* @param connectedCluster Parameters supplied to Create a Connected 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 represents a connected cluster on successful completion of {@link Mono}.
+ * @return the {@link SyncPoller} for polling of represents a connected cluster.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono createOrReplaceAsync(String resourceGroupName, String clusterName,
- ConnectedClusterInner connectedCluster) {
- return beginCreateOrReplaceAsync(resourceGroupName, clusterName, connectedCluster).last()
- .flatMap(this.client::getLroFinalResultOrError);
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, ConnectedClusterInner> beginCreateOrReplace(
+ String resourceGroupName, String clusterName, ConnectedClusterInner connectedCluster, Context context) {
+ Response response
+ = createOrReplaceWithResponse(resourceGroupName, clusterName, connectedCluster, context);
+ return this.client.getLroResult(response,
+ ConnectedClusterInner.class, ConnectedClusterInner.class, context);
}
/**
@@ -368,7 +584,6 @@ private Mono createOrReplaceAsync(String resourceGroupNam
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the Kubernetes cluster on which get is called.
* @param connectedCluster Parameters supplied to Create a Connected 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.
@@ -376,8 +591,8 @@ private Mono createOrReplaceAsync(String resourceGroupNam
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono createOrReplaceAsync(String resourceGroupName, String clusterName,
- ConnectedClusterInner connectedCluster, Context context) {
- return beginCreateOrReplaceAsync(resourceGroupName, clusterName, connectedCluster, context).last()
+ ConnectedClusterInner connectedCluster) {
+ return beginCreateOrReplaceAsync(resourceGroupName, clusterName, connectedCluster).last()
.flatMap(this.client::getLroFinalResultOrError);
}
@@ -398,7 +613,7 @@ private Mono createOrReplaceAsync(String resourceGroupNam
@ServiceMethod(returns = ReturnType.SINGLE)
public ConnectedClusterInner createOrReplace(String resourceGroupName, String clusterName,
ConnectedClusterInner connectedCluster) {
- return createOrReplaceAsync(resourceGroupName, clusterName, connectedCluster).block();
+ return beginCreateOrReplace(resourceGroupName, clusterName, connectedCluster).getFinalResult();
}
/**
@@ -419,7 +634,7 @@ public ConnectedClusterInner createOrReplace(String resourceGroupName, String cl
@ServiceMethod(returns = ReturnType.SINGLE)
public ConnectedClusterInner createOrReplace(String resourceGroupName, String clusterName,
ConnectedClusterInner connectedCluster, Context context) {
- return createOrReplaceAsync(resourceGroupName, clusterName, connectedCluster, context).block();
+ return beginCreateOrReplace(resourceGroupName, clusterName, connectedCluster, context).getFinalResult();
}
/**
@@ -459,9 +674,12 @@ private Mono> updateWithResponseAsync(String res
} else {
connectedClusterPatch.validate();
}
+ final String contentType = "application/json";
final String accept = "application/json";
- return FluxUtil.withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(),
- this.client.getSubscriptionId(), resourceGroupName, clusterName, connectedClusterPatch, accept, context))
+ return FluxUtil
+ .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept,
+ connectedClusterPatch, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
@@ -473,54 +691,10 @@ private Mono> updateWithResponseAsync(String res
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the Kubernetes cluster on which get is called.
* @param connectedClusterPatch Parameters supplied to update Connected 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 represents a connected cluster along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> updateWithResponseAsync(String resourceGroupName, String clusterName,
- ConnectedClusterPatch connectedClusterPatch, 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 (clusterName == null) {
- return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
- }
- if (connectedClusterPatch == null) {
- return Mono
- .error(new IllegalArgumentException("Parameter connectedClusterPatch is required and cannot be null."));
- } else {
- connectedClusterPatch.validate();
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
- resourceGroupName, clusterName, connectedClusterPatch, accept, context);
- }
-
- /**
- * Updates a connected cluster.
- *
- * API to update certain properties of the connected cluster resource.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param clusterName The name of the Kubernetes cluster on which get is called.
- * @param connectedClusterPatch Parameters supplied to update Connected 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 represents a connected cluster on successful completion of {@link Mono}.
+ * @return represents a connected cluster on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono updateAsync(String resourceGroupName, String clusterName,
@@ -546,7 +720,35 @@ private Mono updateAsync(String resourceGroupName, String
@ServiceMethod(returns = ReturnType.SINGLE)
public Response updateWithResponse(String resourceGroupName, String clusterName,
ConnectedClusterPatch connectedClusterPatch, Context context) {
- return updateWithResponseAsync(resourceGroupName, clusterName, connectedClusterPatch, context).block();
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (connectedClusterPatch == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter connectedClusterPatch is required and cannot be null."));
+ } else {
+ connectedClusterPatch.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, connectedClusterPatch,
+ context);
}
/**
@@ -569,21 +771,19 @@ public ConnectedClusterInner update(String resourceGroupName, String clusterName
}
/**
- * Get the properties of the specified connected cluster.
+ * Delete a connected cluster.
*
- * Returns the properties of the specified connected cluster, including name, identity, properties, and additional
- * cluster details.
+ * Delete a connected cluster, removing the tracked resource in Azure Resource Manager (ARM).
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param clusterName The name of the Kubernetes cluster on which get is called.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a connected cluster along with {@link Response} on successful completion of {@link Mono}.
+ * @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
- String clusterName) {
+ private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName) {
if (this.client.getEndpoint() == null) {
return Mono.error(
new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
@@ -601,106 +801,11 @@ private Mono> getByResourceGroupWithResponseAsyn
}
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(),
this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
- /**
- * Get the properties of the specified connected cluster.
- *
- * Returns the properties of the specified connected cluster, including name, identity, properties, and additional
- * cluster details.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param clusterName The name of the Kubernetes cluster on which get is called.
- * @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 represents a connected cluster along with {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
- 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 (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.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
- this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context);
- }
-
- /**
- * Get the properties of the specified connected cluster.
- *
- * Returns the properties of the specified connected cluster, including name, identity, properties, and additional
- * cluster details.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param clusterName The name of the Kubernetes cluster on which get is called.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a connected cluster on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono getByResourceGroupAsync(String resourceGroupName, String clusterName) {
- return getByResourceGroupWithResponseAsync(resourceGroupName, clusterName)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
- }
-
- /**
- * Get the properties of the specified connected cluster.
- *
- * Returns the properties of the specified connected cluster, including name, identity, properties, and additional
- * cluster details.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param clusterName The name of the Kubernetes cluster on which get is called.
- * @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 represents a connected cluster along with {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName,
- Context context) {
- return getByResourceGroupWithResponseAsync(resourceGroupName, clusterName, context).block();
- }
-
- /**
- * Get the properties of the specified connected cluster.
- *
- * Returns the properties of the specified connected cluster, including name, identity, properties, and additional
- * cluster details.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param clusterName The name of the Kubernetes cluster on which get is called.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a connected cluster.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public ConnectedClusterInner getByResourceGroup(String resourceGroupName, String clusterName) {
- return getByResourceGroupWithResponse(resourceGroupName, clusterName, Context.NONE).getValue();
- }
-
/**
* Delete a connected cluster.
*
@@ -711,30 +816,31 @@ public ConnectedClusterInner getByResourceGroup(String resourceGroupName, String
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response} on successful completion of {@link Mono}.
+ * @return the response body along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName) {
+ private Response deleteWithResponse(String resourceGroupName, String clusterName) {
if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(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."));
+ throw LOGGER.atError()
+ .log(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."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
if (clusterName == null) {
- return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
}
final String accept = "application/json";
- return FluxUtil
- .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(),
- this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, Context.NONE);
}
/**
@@ -748,30 +854,31 @@ private Mono>> deleteWithResponseAsync(String resource
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response} on successful completion of {@link Mono}.
+ * @return the response body along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName,
- Context context) {
+ private Response deleteWithResponse(String resourceGroupName, String clusterName, Context context) {
if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(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."));
+ throw LOGGER.atError()
+ .log(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."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
}
if (clusterName == null) {
- return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
}
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
- resourceGroupName, clusterName, accept, context);
+ return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, clusterName, accept, context);
}
/**
@@ -793,28 +900,6 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup
this.client.getContext());
}
- /**
- * Delete a connected cluster.
- *
- * Delete a connected cluster, removing the tracked resource in Azure Resource Manager (ARM).
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param clusterName The name of the Kubernetes cluster on which get is called.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link PollerFlux} for polling of long-running operation.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName,
- Context context) {
- context = this.client.mergeContext(context);
- Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName, context);
- return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
- context);
- }
-
/**
* Delete a connected cluster.
*
@@ -829,7 +914,8 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName) {
- return this.beginDeleteAsync(resourceGroupName, clusterName).getSyncPoller();
+ Response response = deleteWithResponse(resourceGroupName, clusterName);
+ return this.client.getLroResult(response, Void.class, Void.class, Context.NONE);
}
/**
@@ -848,7 +934,8 @@ public SyncPoller, Void> beginDelete(String resourceGroupName,
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName,
Context context) {
- return this.beginDeleteAsync(resourceGroupName, clusterName, context).getSyncPoller();
+ Response response = deleteWithResponse(resourceGroupName, clusterName, context);
+ return this.client.getLroResult(response, Void.class, Void.class, context);
}
/**
@@ -868,25 +955,6 @@ private Mono deleteAsync(String resourceGroupName, String clusterName) {
return beginDeleteAsync(resourceGroupName, clusterName).last().flatMap(this.client::getLroFinalResultOrError);
}
- /**
- * Delete a connected cluster.
- *
- * Delete a connected cluster, removing the tracked resource in Azure Resource Manager (ARM).
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param clusterName The name of the Kubernetes cluster on which get is called.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return A {@link Mono} that completes when a successful response is received.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono deleteAsync(String resourceGroupName, String clusterName, Context context) {
- return beginDeleteAsync(resourceGroupName, clusterName, context).last()
- .flatMap(this.client::getLroFinalResultOrError);
- }
-
/**
* Delete a connected cluster.
*
@@ -900,7 +968,7 @@ private Mono deleteAsync(String resourceGroupName, String clusterName, Con
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public void delete(String resourceGroupName, String clusterName) {
- deleteAsync(resourceGroupName, clusterName).block();
+ beginDelete(resourceGroupName, clusterName).getFinalResult();
}
/**
@@ -917,162 +985,11 @@ public void delete(String resourceGroupName, String clusterName) {
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public void delete(String resourceGroupName, String clusterName, Context context) {
- deleteAsync(resourceGroupName, clusterName, context).block();
- }
-
- /**
- * Gets cluster user credentials of a connected cluster
- *
- * Gets cluster user credentials of the connected cluster with a specified resource group and name.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param clusterName The name of the Kubernetes cluster on which get is called.
- * @param properties ListClusterUserCredential properties.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return cluster user credentials of the connected cluster with a specified resource group and name along with
- * {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listClusterUserCredentialWithResponseAsync(String resourceGroupName,
- String clusterName, ListClusterUserCredentialProperties properties) {
- 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 (clusterName == null) {
- return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
- }
- if (properties == null) {
- return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null."));
- } else {
- properties.validate();
- }
- final String accept = "application/json";
- return FluxUtil
- .withContext(
- context -> service.listClusterUserCredential(this.client.getEndpoint(), this.client.getApiVersion(),
- this.client.getSubscriptionId(), resourceGroupName, clusterName, properties, accept, context))
- .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
- }
-
- /**
- * Gets cluster user credentials of a connected cluster
- *
- * Gets cluster user credentials of the connected cluster with a specified resource group and name.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param clusterName The name of the Kubernetes cluster on which get is called.
- * @param properties ListClusterUserCredential properties.
- * @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 cluster user credentials of the connected cluster with a specified resource group and name along with
- * {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listClusterUserCredentialWithResponseAsync(String resourceGroupName,
- String clusterName, ListClusterUserCredentialProperties properties, 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 (clusterName == null) {
- return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
- }
- if (properties == null) {
- return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null."));
- } else {
- properties.validate();
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.listClusterUserCredential(this.client.getEndpoint(), this.client.getApiVersion(),
- this.client.getSubscriptionId(), resourceGroupName, clusterName, properties, accept, context);
- }
-
- /**
- * Gets cluster user credentials of a connected cluster
- *
- * Gets cluster user credentials of the connected cluster with a specified resource group and name.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param clusterName The name of the Kubernetes cluster on which get is called.
- * @param properties ListClusterUserCredential properties.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return cluster user credentials of the connected cluster with a specified resource group and name on successful
- * completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono listClusterUserCredentialAsync(String resourceGroupName, String clusterName,
- ListClusterUserCredentialProperties properties) {
- return listClusterUserCredentialWithResponseAsync(resourceGroupName, clusterName, properties)
- .flatMap(res -> Mono.justOrEmpty(res.getValue()));
- }
-
- /**
- * Gets cluster user credentials of a connected cluster
- *
- * Gets cluster user credentials of the connected cluster with a specified resource group and name.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param clusterName The name of the Kubernetes cluster on which get is called.
- * @param properties ListClusterUserCredential properties.
- * @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 cluster user credentials of the connected cluster with a specified resource group and name along with
- * {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response listClusterUserCredentialWithResponse(String resourceGroupName,
- String clusterName, ListClusterUserCredentialProperties properties, Context context) {
- return listClusterUserCredentialWithResponseAsync(resourceGroupName, clusterName, properties, context).block();
- }
-
- /**
- * Gets cluster user credentials of a connected cluster
- *
- * Gets cluster user credentials of the connected cluster with a specified resource group and name.
- *
- * @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @param clusterName The name of the Kubernetes cluster on which get is called.
- * @param properties ListClusterUserCredential properties.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws ManagementException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return cluster user credentials of the connected cluster with a specified resource group and name.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public CredentialResultsInner listClusterUserCredential(String resourceGroupName, String clusterName,
- ListClusterUserCredentialProperties properties) {
- return listClusterUserCredentialWithResponse(resourceGroupName, clusterName, properties, Context.NONE)
- .getValue();
+ beginDelete(resourceGroupName, clusterName, context).getFinalResult();
}
/**
- * Lists all connected clusters in the given ResourceGroup
+ * Lists all connected clusters in the given Resource Group
*
* API to enumerate registered connected K8s clusters under a Resource Group.
*
@@ -1107,44 +1024,24 @@ private Mono> listByResourceGroupSinglePage
}
/**
- * Lists all connected clusters in the given ResourceGroup
+ * Lists all connected clusters in the given Resource Group
*
* API to enumerate registered connected K8s clusters under a Resource Group.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
- * @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 paginated list of connected Clusters along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
+ * @return the paginated list of connected Clusters as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName,
- 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."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service
- .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
- this.client.getSubscriptionId(), resourceGroupName, accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
}
/**
- * Lists all connected clusters in the given ResourceGroup
+ * Lists all connected clusters in the given Resource Group
*
* API to enumerate registered connected K8s clusters under a Resource Group.
*
@@ -1152,16 +1049,33 @@ private Mono> listByResourceGroupSinglePage
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the paginated list of connected Clusters as paginated response with {@link PagedFlux}.
+ * @return the paginated list of connected Clusters along with {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
- return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName),
- nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res = service.listByResourceGroupSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
- * Lists all connected clusters in the given ResourceGroup
+ * Lists all connected clusters in the given Resource Group
*
* API to enumerate registered connected K8s clusters under a Resource Group.
*
@@ -1170,16 +1084,34 @@ private PagedFlux listByResourceGroupAsync(String resourc
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the paginated list of connected Clusters as paginated response with {@link PagedFlux}.
+ * @return the paginated list of connected Clusters along with {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
- return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
- nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listByResourceGroupSinglePage(String resourceGroupName,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res = service.listByResourceGroupSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
- * Lists all connected clusters in the given ResourceGroup
+ * Lists all connected clusters in the given Resource Group
*
* API to enumerate registered connected K8s clusters under a Resource Group.
*
@@ -1191,11 +1123,12 @@ private PagedFlux listByResourceGroupAsync(String resourc
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByResourceGroup(String resourceGroupName) {
- return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePage(nextLink));
}
/**
- * Lists all connected clusters in the given ResourceGroup
+ * Lists all connected clusters in the given Resource Group
*
* API to enumerate registered connected K8s clusters under a Resource Group.
*
@@ -1208,7 +1141,8 @@ public PagedIterable listByResourceGroup(String resourceG
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
- return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
+ return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context),
+ nextLink -> listByResourceGroupNextSinglePage(nextLink, context));
}
/**
@@ -1233,8 +1167,8 @@ private Mono> listSinglePageAsync() {
}
final String accept = "application/json";
return FluxUtil
- .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(),
- this.client.getApiVersion(), accept, context))
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), 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()));
@@ -1245,30 +1179,14 @@ private Mono> listSinglePageAsync() {
*
* API to enumerate registered connected K8s clusters under a Subscription.
*
- * @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 paginated list of connected Clusters along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
+ * @return the paginated list of connected Clusters as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listSinglePageAsync(Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- if (this.client.getSubscriptionId() == null) {
- return Mono.error(new IllegalArgumentException(
- "Parameter this.client.getSubscriptionId() 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(), this.client.getApiVersion(), accept,
- context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
}
/**
@@ -1278,12 +1196,25 @@ private Mono> listSinglePageAsync(Context c
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the paginated list of connected Clusters as paginated response with {@link PagedFlux}.
+ * @return the paginated list of connected Clusters along with {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync() {
- return new PagedFlux<>(() -> listSinglePageAsync(),
- nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage() {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
@@ -1295,12 +1226,25 @@ private PagedFlux listAsync() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the paginated list of connected Clusters as paginated response with {@link PagedFlux}.
+ * @return the paginated list of connected Clusters along with {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux listAsync(Context context) {
- return new PagedFlux<>(() -> listSinglePageAsync(context),
- nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
@@ -1314,7 +1258,7 @@ private PagedFlux listAsync(Context context) {
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list() {
- return new PagedIterable<>(listAsync());
+ return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink));
}
/**
@@ -1330,10 +1274,156 @@ public PagedIterable list() {
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(Context context) {
- return new PagedIterable<>(listAsync(context));
+ return new PagedIterable<>(() -> listSinglePage(context),
+ nextLink -> listBySubscriptionNextSinglePage(nextLink, context));
+ }
+
+ /**
+ * Gets cluster user credentials of a connected cluster
+ *
+ * Gets cluster user credentials of the connected cluster with a specified resource group and name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the Kubernetes cluster on which get is called.
+ * @param properties ListClusterUserCredential properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cluster user credentials of a connected cluster
+ *
+ * Gets cluster user credentials of the connected cluster with a specified resource group and name along with
+ * {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listClusterUserCredentialWithResponseAsync(String resourceGroupName,
+ String clusterName, ListClusterUserCredentialProperties properties) {
+ 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 (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (properties == null) {
+ return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null."));
+ } else {
+ properties.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listClusterUserCredential(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, clusterName,
+ contentType, accept, properties, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets cluster user credentials of a connected cluster
+ *
+ * Gets cluster user credentials of the connected cluster with a specified resource group and name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the Kubernetes cluster on which get is called.
+ * @param properties ListClusterUserCredential properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cluster user credentials of a connected cluster
+ *
+ * Gets cluster user credentials of the connected cluster with a specified resource group and name on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono listClusterUserCredentialAsync(String resourceGroupName, String clusterName,
+ ListClusterUserCredentialProperties properties) {
+ return listClusterUserCredentialWithResponseAsync(resourceGroupName, clusterName, properties)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Gets cluster user credentials of a connected cluster
+ *
+ * Gets cluster user credentials of the connected cluster with a specified resource group and name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the Kubernetes cluster on which get is called.
+ * @param properties ListClusterUserCredential properties.
+ * @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 cluster user credentials of a connected cluster
+ *
+ * Gets cluster user credentials of the connected cluster with a specified resource group and name along with
+ * {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response listClusterUserCredentialWithResponse(String resourceGroupName,
+ String clusterName, ListClusterUserCredentialProperties properties, Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (properties == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter properties is required and cannot be null."));
+ } else {
+ properties.validate();
+ }
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.listClusterUserCredentialSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, clusterName, contentType, accept, properties, context);
+ }
+
+ /**
+ * Gets cluster user credentials of a connected cluster
+ *
+ * Gets cluster user credentials of the connected cluster with a specified resource group and name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the Kubernetes cluster on which get is called.
+ * @param properties ListClusterUserCredential properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return cluster user credentials of a connected cluster
+ *
+ * Gets cluster user credentials of the connected cluster with a specified resource group and name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CredentialResultsInner listClusterUserCredential(String resourceGroupName, String clusterName,
+ ListClusterUserCredentialProperties properties) {
+ return listClusterUserCredentialWithResponse(resourceGroupName, clusterName, properties, Context.NONE)
+ .getValue();
}
/**
+ * Lists all connected clusters in the given Resource Group
+ *
* Get the next page of items.
*
* @param nextLink The URL to get the next list of items.
@@ -1362,6 +1452,37 @@ private Mono> listByResourceGroupNextSingle
}
/**
+ * Lists all connected clusters in the given Resource Group
+ *
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of connected Clusters along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listByResourceGroupNextSinglePage(String nextLink) {
+ if (nextLink == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res
+ = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Lists all connected clusters in the given Resource Group
+ *
* Get the next page of items.
*
* @param nextLink The URL to get the next list of items.
@@ -1369,27 +1490,29 @@ private Mono> listByResourceGroupNextSingle
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the paginated list of connected Clusters along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
+ * @return the paginated list of connected Clusters along with {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listByResourceGroupNextSinglePageAsync(String nextLink,
- Context context) {
+ private PagedResponse listByResourceGroupNextSinglePage(String nextLink, Context context) {
if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(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."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
+ Response res
+ = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
+ * Lists all connected clusters in the given Subscription
+ *
* Get the next page of items.
*
* @param nextLink The URL to get the next list of items.
@@ -1418,6 +1541,37 @@ private Mono> listBySubscriptionNextSingleP
}
/**
+ * Lists all connected clusters in the given Subscription
+ *
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of connected Clusters along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listBySubscriptionNextSinglePage(String nextLink) {
+ if (nextLink == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res
+ = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * Lists all connected clusters in the given Subscription
+ *
* Get the next page of items.
*
* @param nextLink The URL to get the next list of items.
@@ -1425,23 +1579,25 @@ private Mono> listBySubscriptionNextSingleP
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the paginated list of connected Clusters along with {@link PagedResponse} on successful completion of
- * {@link Mono}.
+ * @return the paginated list of connected Clusters along with {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> listBySubscriptionNextSinglePageAsync(String nextLink,
- Context context) {
+ private PagedResponse listBySubscriptionNextSinglePage(String nextLink, Context context) {
if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(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."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
+ Response res
+ = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(ConnectedClustersClientImpl.class);
}
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/ConnectedClustersImpl.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/ConnectedClustersImpl.java
index 8856476e70b9..07a72d483b3b 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/ConnectedClustersImpl.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/ConnectedClustersImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.hybridkubernetes.implementation;
@@ -22,10 +22,10 @@ public final class ConnectedClustersImpl implements ConnectedClusters {
private final ConnectedClustersClient innerClient;
- private final com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager serviceManager;
+ private final com.azure.resourcemanager.hybridkubernetes.HybridkubernetesManager serviceManager;
public ConnectedClustersImpl(ConnectedClustersClient innerClient,
- com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager serviceManager) {
+ com.azure.resourcemanager.hybridkubernetes.HybridkubernetesManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
@@ -59,6 +59,27 @@ public void delete(String resourceGroupName, String clusterName, Context context
this.serviceClient().delete(resourceGroupName, clusterName, context);
}
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ConnectedClusterImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner
+ = this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ConnectedClusterImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ConnectedClusterImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ConnectedClusterImpl(inner1, this.manager()));
+ }
+
public Response listClusterUserCredentialWithResponse(String resourceGroupName,
String clusterName, ListClusterUserCredentialProperties properties, Context context) {
Response inner = this.serviceClient()
@@ -82,32 +103,11 @@ public CredentialResults listClusterUserCredential(String resourceGroupName, Str
}
}
- public PagedIterable listByResourceGroup(String resourceGroupName) {
- PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
- return ResourceManagerUtils.mapPage(inner, inner1 -> new ConnectedClusterImpl(inner1, this.manager()));
- }
-
- public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
- PagedIterable inner
- = this.serviceClient().listByResourceGroup(resourceGroupName, context);
- return ResourceManagerUtils.mapPage(inner, inner1 -> new ConnectedClusterImpl(inner1, this.manager()));
- }
-
- public PagedIterable list() {
- PagedIterable inner = this.serviceClient().list();
- return ResourceManagerUtils.mapPage(inner, inner1 -> new ConnectedClusterImpl(inner1, this.manager()));
- }
-
- public PagedIterable list(Context context) {
- PagedIterable inner = this.serviceClient().list(context);
- return ResourceManagerUtils.mapPage(inner, inner1 -> new ConnectedClusterImpl(inner1, this.manager()));
- }
-
public ConnectedCluster getById(String id) {
- String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourcegroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id)));
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "connectedClusters");
if (clusterName == null) {
@@ -118,10 +118,10 @@ public ConnectedCluster getById(String id) {
}
public Response getByIdWithResponse(String id, Context context) {
- String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourcegroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id)));
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "connectedClusters");
if (clusterName == null) {
@@ -132,10 +132,10 @@ public Response getByIdWithResponse(String id, Context context
}
public void deleteById(String id) {
- String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourcegroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id)));
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "connectedClusters");
if (clusterName == null) {
@@ -146,10 +146,10 @@ public void deleteById(String id) {
}
public void deleteByIdWithResponse(String id, Context context) {
- String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourcegroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
- String.format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id)));
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "connectedClusters");
if (clusterName == null) {
@@ -163,7 +163,7 @@ private ConnectedClustersClient serviceClient() {
return this.innerClient;
}
- private com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager manager() {
+ private com.azure.resourcemanager.hybridkubernetes.HybridkubernetesManager manager() {
return this.serviceManager;
}
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/CredentialResultsImpl.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/CredentialResultsImpl.java
index 007ea1c534d7..3adfdef2e253 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/CredentialResultsImpl.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/CredentialResultsImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.hybridkubernetes.implementation;
@@ -14,10 +14,10 @@
public final class CredentialResultsImpl implements CredentialResults {
private CredentialResultsInner innerObject;
- private final com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager serviceManager;
+ private final com.azure.resourcemanager.hybridkubernetes.HybridkubernetesManager serviceManager;
CredentialResultsImpl(CredentialResultsInner innerObject,
- com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager serviceManager) {
+ com.azure.resourcemanager.hybridkubernetes.HybridkubernetesManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -39,7 +39,7 @@ public CredentialResultsInner innerModel() {
return this.innerObject;
}
- private com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager manager() {
+ private com.azure.resourcemanager.hybridkubernetes.HybridkubernetesManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/HybridKubernetesManagementClientBuilder.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/KubernetesClientBuilder.java
similarity index 62%
rename from sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/HybridKubernetesManagementClientBuilder.java
rename to sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/KubernetesClientBuilder.java
index 896e18376905..d16ff87cf6e7 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/HybridKubernetesManagementClientBuilder.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/KubernetesClientBuilder.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.hybridkubernetes.implementation;
@@ -15,39 +15,39 @@
import java.time.Duration;
/**
- * A builder for creating a new instance of the HybridKubernetesManagementClientImpl type.
+ * A builder for creating a new instance of the KubernetesClientImpl type.
*/
-@ServiceClientBuilder(serviceClients = { HybridKubernetesManagementClientImpl.class })
-public final class HybridKubernetesManagementClientBuilder {
+@ServiceClientBuilder(serviceClients = { KubernetesClientImpl.class })
+public final class KubernetesClientBuilder {
/*
- * The ID of the target subscription.
+ * Service host
*/
- private String subscriptionId;
+ private String endpoint;
/**
- * Sets The ID of the target subscription.
+ * Sets Service host.
*
- * @param subscriptionId the subscriptionId value.
- * @return the HybridKubernetesManagementClientBuilder.
+ * @param endpoint the endpoint value.
+ * @return the KubernetesClientBuilder.
*/
- public HybridKubernetesManagementClientBuilder subscriptionId(String subscriptionId) {
- this.subscriptionId = subscriptionId;
+ public KubernetesClientBuilder endpoint(String endpoint) {
+ this.endpoint = endpoint;
return this;
}
/*
- * server parameter
+ * The ID of the target subscription. The value must be an UUID.
*/
- private String endpoint;
+ private String subscriptionId;
/**
- * Sets server parameter.
+ * Sets The ID of the target subscription. The value must be an UUID.
*
- * @param endpoint the endpoint value.
- * @return the HybridKubernetesManagementClientBuilder.
+ * @param subscriptionId the subscriptionId value.
+ * @return the KubernetesClientBuilder.
*/
- public HybridKubernetesManagementClientBuilder endpoint(String endpoint) {
- this.endpoint = endpoint;
+ public KubernetesClientBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
return this;
}
@@ -60,9 +60,9 @@ public HybridKubernetesManagementClientBuilder endpoint(String endpoint) {
* Sets The environment to connect to.
*
* @param environment the environment value.
- * @return the HybridKubernetesManagementClientBuilder.
+ * @return the KubernetesClientBuilder.
*/
- public HybridKubernetesManagementClientBuilder environment(AzureEnvironment environment) {
+ public KubernetesClientBuilder environment(AzureEnvironment environment) {
this.environment = environment;
return this;
}
@@ -76,9 +76,9 @@ public HybridKubernetesManagementClientBuilder environment(AzureEnvironment envi
* Sets The HTTP pipeline to send requests through.
*
* @param pipeline the pipeline value.
- * @return the HybridKubernetesManagementClientBuilder.
+ * @return the KubernetesClientBuilder.
*/
- public HybridKubernetesManagementClientBuilder pipeline(HttpPipeline pipeline) {
+ public KubernetesClientBuilder pipeline(HttpPipeline pipeline) {
this.pipeline = pipeline;
return this;
}
@@ -92,9 +92,9 @@ public HybridKubernetesManagementClientBuilder pipeline(HttpPipeline pipeline) {
* Sets The default poll interval for long-running operation.
*
* @param defaultPollInterval the defaultPollInterval value.
- * @return the HybridKubernetesManagementClientBuilder.
+ * @return the KubernetesClientBuilder.
*/
- public HybridKubernetesManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
+ public KubernetesClientBuilder defaultPollInterval(Duration defaultPollInterval) {
this.defaultPollInterval = defaultPollInterval;
return this;
}
@@ -108,19 +108,19 @@ public HybridKubernetesManagementClientBuilder defaultPollInterval(Duration defa
* Sets The serializer to serialize an object into a string.
*
* @param serializerAdapter the serializerAdapter value.
- * @return the HybridKubernetesManagementClientBuilder.
+ * @return the KubernetesClientBuilder.
*/
- public HybridKubernetesManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ public KubernetesClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
this.serializerAdapter = serializerAdapter;
return this;
}
/**
- * Builds an instance of HybridKubernetesManagementClientImpl with the provided parameters.
+ * Builds an instance of KubernetesClientImpl with the provided parameters.
*
- * @return an instance of HybridKubernetesManagementClientImpl.
+ * @return an instance of KubernetesClientImpl.
*/
- public HybridKubernetesManagementClientImpl buildClient() {
+ public KubernetesClientImpl buildClient() {
String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
HttpPipeline localPipeline = (pipeline != null)
@@ -131,8 +131,8 @@ public HybridKubernetesManagementClientImpl buildClient() {
SerializerAdapter localSerializerAdapter = (serializerAdapter != null)
? serializerAdapter
: SerializerFactory.createDefaultManagementSerializerAdapter();
- HybridKubernetesManagementClientImpl client = new HybridKubernetesManagementClientImpl(localPipeline,
- localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint);
+ KubernetesClientImpl client = new KubernetesClientImpl(localPipeline, localSerializerAdapter,
+ localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId);
return client;
}
}
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/HybridKubernetesManagementClientImpl.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/KubernetesClientImpl.java
similarity index 83%
rename from sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/HybridKubernetesManagementClientImpl.java
rename to sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/KubernetesClientImpl.java
index 334b69f7b7be..aa2b465ba9be 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/HybridKubernetesManagementClientImpl.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/KubernetesClientImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.hybridkubernetes.implementation;
@@ -15,16 +15,19 @@
import com.azure.core.management.exception.ManagementException;
import com.azure.core.management.polling.PollResult;
import com.azure.core.management.polling.PollerFactory;
+import com.azure.core.management.polling.SyncPollerFactory;
+import com.azure.core.util.BinaryData;
import com.azure.core.util.Context;
import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.polling.AsyncPollResponse;
import com.azure.core.util.polling.LongRunningOperationStatus;
import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
import com.azure.core.util.serializer.SerializerAdapter;
import com.azure.core.util.serializer.SerializerEncoding;
import com.azure.resourcemanager.hybridkubernetes.fluent.ConnectedClustersClient;
-import com.azure.resourcemanager.hybridkubernetes.fluent.HybridKubernetesManagementClient;
+import com.azure.resourcemanager.hybridkubernetes.fluent.KubernetesClient;
import com.azure.resourcemanager.hybridkubernetes.fluent.OperationsClient;
import java.io.IOException;
import java.lang.reflect.Type;
@@ -36,31 +39,17 @@
import reactor.core.publisher.Mono;
/**
- * Initializes a new instance of the HybridKubernetesManagementClientImpl type.
+ * Initializes a new instance of the KubernetesClientImpl type.
*/
-@ServiceClient(builder = HybridKubernetesManagementClientBuilder.class)
-public final class HybridKubernetesManagementClientImpl implements HybridKubernetesManagementClient {
+@ServiceClient(builder = KubernetesClientBuilder.class)
+public final class KubernetesClientImpl implements KubernetesClient {
/**
- * The ID of the target subscription.
- */
- private final String subscriptionId;
-
- /**
- * Gets The ID of the target subscription.
- *
- * @return the subscriptionId value.
- */
- public String getSubscriptionId() {
- return this.subscriptionId;
- }
-
- /**
- * server parameter.
+ * Service host.
*/
private final String endpoint;
/**
- * Gets server parameter.
+ * Gets Service host.
*
* @return the endpoint value.
*/
@@ -69,12 +58,12 @@ public String getEndpoint() {
}
/**
- * Api Version.
+ * Version parameter.
*/
private final String apiVersion;
/**
- * Gets Api Version.
+ * Gets Version parameter.
*
* @return the apiVersion value.
*/
@@ -82,6 +71,20 @@ public String getApiVersion() {
return this.apiVersion;
}
+ /**
+ * The ID of the target subscription. The value must be an UUID.
+ */
+ private final String subscriptionId;
+
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ public String getSubscriptionId() {
+ return this.subscriptionId;
+ }
+
/**
* The HTTP pipeline to send requests through.
*/
@@ -125,53 +128,53 @@ public Duration getDefaultPollInterval() {
}
/**
- * The ConnectedClustersClient object to access its operations.
+ * The OperationsClient object to access its operations.
*/
- private final ConnectedClustersClient connectedClusters;
+ private final OperationsClient operations;
/**
- * Gets the ConnectedClustersClient object to access its operations.
+ * Gets the OperationsClient object to access its operations.
*
- * @return the ConnectedClustersClient object.
+ * @return the OperationsClient object.
*/
- public ConnectedClustersClient getConnectedClusters() {
- return this.connectedClusters;
+ public OperationsClient getOperations() {
+ return this.operations;
}
/**
- * The OperationsClient object to access its operations.
+ * The ConnectedClustersClient object to access its operations.
*/
- private final OperationsClient operations;
+ private final ConnectedClustersClient connectedClusters;
/**
- * Gets the OperationsClient object to access its operations.
+ * Gets the ConnectedClustersClient object to access its operations.
*
- * @return the OperationsClient object.
+ * @return the ConnectedClustersClient object.
*/
- public OperationsClient getOperations() {
- return this.operations;
+ public ConnectedClustersClient getConnectedClusters() {
+ return this.connectedClusters;
}
/**
- * Initializes an instance of HybridKubernetesManagementClient client.
+ * Initializes an instance of KubernetesClient client.
*
* @param httpPipeline The HTTP pipeline to send requests through.
* @param serializerAdapter The serializer to serialize an object into a string.
* @param defaultPollInterval The default poll interval for long-running operation.
* @param environment The Azure environment.
- * @param subscriptionId The ID of the target subscription.
- * @param endpoint server parameter.
+ * @param endpoint Service host.
+ * @param subscriptionId The ID of the target subscription. The value must be an UUID.
*/
- HybridKubernetesManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter,
- Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) {
+ KubernetesClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, Duration defaultPollInterval,
+ AzureEnvironment environment, String endpoint, String subscriptionId) {
this.httpPipeline = httpPipeline;
this.serializerAdapter = serializerAdapter;
this.defaultPollInterval = defaultPollInterval;
- this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
+ this.subscriptionId = subscriptionId;
this.apiVersion = "2024-12-01-preview";
- this.connectedClusters = new ConnectedClustersClientImpl(this);
this.operations = new OperationsClientImpl(this);
+ this.connectedClusters = new ConnectedClustersClientImpl(this);
}
/**
@@ -211,6 +214,23 @@ public PollerFlux, U> getLroResult(Mono type of poll result.
+ * @param type of final result.
+ * @return SyncPoller for poll result and final result.
+ */
+ public SyncPoller, U> getLroResult(Response activationResponse,
+ Type pollResultType, Type finalResultType, Context context) {
+ return SyncPollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType,
+ defaultPollInterval, () -> activationResponse, context);
+ }
+
/**
* Gets the final result, or an error, based on last async poll response.
*
@@ -300,5 +320,5 @@ public Mono getBodyAsString(Charset charset) {
}
}
- private static final ClientLogger LOGGER = new ClientLogger(HybridKubernetesManagementClientImpl.class);
+ private static final ClientLogger LOGGER = new ClientLogger(KubernetesClientImpl.class);
}
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/OperationImpl.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/OperationImpl.java
index d66f1b874eba..86bac55cb0c3 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/OperationImpl.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/OperationImpl.java
@@ -1,20 +1,22 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.hybridkubernetes.implementation;
import com.azure.resourcemanager.hybridkubernetes.fluent.models.OperationInner;
+import com.azure.resourcemanager.hybridkubernetes.models.ActionType;
import com.azure.resourcemanager.hybridkubernetes.models.Operation;
import com.azure.resourcemanager.hybridkubernetes.models.OperationDisplay;
+import com.azure.resourcemanager.hybridkubernetes.models.Origin;
public final class OperationImpl implements Operation {
private OperationInner innerObject;
- private final com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager serviceManager;
+ private final com.azure.resourcemanager.hybridkubernetes.HybridkubernetesManager serviceManager;
OperationImpl(OperationInner innerObject,
- com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager serviceManager) {
+ com.azure.resourcemanager.hybridkubernetes.HybridkubernetesManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
}
@@ -23,15 +25,27 @@ public String name() {
return this.innerModel().name();
}
+ public Boolean isDataAction() {
+ return this.innerModel().isDataAction();
+ }
+
public OperationDisplay display() {
return this.innerModel().display();
}
+ public Origin origin() {
+ return this.innerModel().origin();
+ }
+
+ public ActionType actionType() {
+ return this.innerModel().actionType();
+ }
+
public OperationInner innerModel() {
return this.innerObject;
}
- private com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager manager() {
+ private com.azure.resourcemanager.hybridkubernetes.HybridkubernetesManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/OperationsClientImpl.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/OperationsClientImpl.java
index 76bc543b3611..4dc91407b5bf 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/OperationsClientImpl.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/OperationsClientImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.hybridkubernetes.implementation;
@@ -25,9 +25,10 @@
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.hybridkubernetes.fluent.OperationsClient;
import com.azure.resourcemanager.hybridkubernetes.fluent.models.OperationInner;
-import com.azure.resourcemanager.hybridkubernetes.models.OperationList;
+import com.azure.resourcemanager.hybridkubernetes.implementation.models.OperationList;
import reactor.core.publisher.Mono;
/**
@@ -42,43 +43,57 @@ public final class OperationsClientImpl implements OperationsClient {
/**
* The service client containing this operation class.
*/
- private final HybridKubernetesManagementClientImpl client;
+ private final KubernetesClientImpl client;
/**
* Initializes an instance of OperationsClientImpl.
*
* @param client the instance of the service client containing this operation class.
*/
- OperationsClientImpl(HybridKubernetesManagementClientImpl client) {
+ OperationsClientImpl(KubernetesClientImpl client) {
this.service
= RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
this.client = client;
}
/**
- * The interface defining all the services for HybridKubernetesManagementClientOperations to be used by the proxy
- * service to perform REST calls.
+ * The interface defining all the services for KubernetesClientOperations to be used by the proxy service to perform
+ * REST calls.
*/
- @Host("{$host}")
- @ServiceInterface(name = "HybridKubernetesMana")
+ @Host("{endpoint}")
+ @ServiceInterface(name = "KubernetesClientOper")
public interface OperationsService {
@Headers({ "Content-Type: application/json" })
@Get("/providers/Microsoft.Kubernetes/operations")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> get(@HostParam("$host") String endpoint,
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/providers/Microsoft.Kubernetes/operations")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("endpoint") String endpoint,
@QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
@Headers({ "Content-Type: application/json" })
@Get("{nextLink}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> getNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
- @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context);
+ Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context);
}
/**
- * Lists all of the available API operations for Connected Cluster resource.
+ * List the operations for the provider.
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -86,7 +101,7 @@ Mono> getNext(@PathParam(value = "nextLink", encoded = t
* completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getSinglePageAsync() {
+ private Mono> listSinglePageAsync() {
if (this.client.getEndpoint() == null) {
return Mono.error(
new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
@@ -94,76 +109,82 @@ private Mono> getSinglePageAsync() {
final String accept = "application/json";
return FluxUtil
.withContext(
- context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), accept, context))
+ context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context))
.>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
/**
- * Lists all of the available API operations for Connected Cluster resource.
+ * List the operations for the provider.
*
- * @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 paginated list of connected cluster API operations along with {@link PagedResponse} on successful
- * completion of {@link Mono}.
+ * @return the paginated list of connected cluster API operations as paginated response with {@link PagedFlux}.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getSinglePageAsync(Context context) {
- if (this.client.getEndpoint() == null) {
- return Mono.error(
- new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
- }
- final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.get(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
}
/**
- * Lists all of the available API operations for Connected Cluster resource.
+ * List the operations for the provider.
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the paginated list of connected cluster API operations as paginated response with {@link PagedFlux}.
+ * @return the paginated list of connected cluster API operations along with {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux getAsync() {
- return new PagedFlux<>(() -> getSinglePageAsync(), nextLink -> getNextSinglePageAsync(nextLink));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage() {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res
+ = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
- * Lists all of the available API operations for Connected Cluster resource.
+ * List the operations for the provider.
*
* @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 paginated list of connected cluster API operations as paginated response with {@link PagedFlux}.
+ * @return the paginated list of connected cluster API operations along with {@link PagedResponse}.
*/
- @ServiceMethod(returns = ReturnType.COLLECTION)
- private PagedFlux getAsync(Context context) {
- return new PagedFlux<>(() -> getSinglePageAsync(context),
- nextLink -> getNextSinglePageAsync(nextLink, context));
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(Context context) {
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res
+ = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
/**
- * Lists all of the available API operations for Connected Cluster resource.
+ * List the operations for the provider.
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the paginated list of connected cluster API operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable get() {
- return new PagedIterable<>(getAsync());
+ public PagedIterable list() {
+ return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(nextLink));
}
/**
- * Lists all of the available API operations for Connected Cluster resource.
+ * List the operations for the provider.
*
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -172,8 +193,8 @@ public PagedIterable get() {
* @return the paginated list of connected cluster API operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable get(Context context) {
- return new PagedIterable<>(getAsync(context));
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, context));
}
/**
@@ -187,7 +208,7 @@ public PagedIterable get(Context context) {
* completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getNextSinglePageAsync(String nextLink) {
+ private Mono> listNextSinglePageAsync(String nextLink) {
if (nextLink == null) {
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
@@ -196,12 +217,38 @@ private Mono> getNextSinglePageAsync(String nextLi
new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
- return FluxUtil.withContext(context -> service.getNext(nextLink, this.client.getEndpoint(), accept, context))
+ return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
.>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
}
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the paginated list of connected cluster API operations along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listNextSinglePage(String nextLink) {
+ if (nextLink == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
/**
* Get the next page of items.
*
@@ -210,22 +257,24 @@ private Mono> getNextSinglePageAsync(String nextLi
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the paginated list of connected cluster API operations along with {@link PagedResponse} on successful
- * completion of {@link Mono}.
+ * @return the paginated list of connected cluster API operations along with {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- private Mono> getNextSinglePageAsync(String nextLink, Context context) {
+ private PagedResponse listNextSinglePage(String nextLink, Context context) {
if (nextLink == null) {
- return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ throw LOGGER.atError()
+ .log(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."));
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
}
final String accept = "application/json";
- context = this.client.mergeContext(context);
- return service.getNext(nextLink, this.client.getEndpoint(), accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().value(), res.getValue().nextLink(), null));
+ Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
}
+
+ private static final ClientLogger LOGGER = new ClientLogger(OperationsClientImpl.class);
}
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/OperationsImpl.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/OperationsImpl.java
index 90cfd63b3285..da15eef1b0f1 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/OperationsImpl.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/OperationsImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.hybridkubernetes.implementation;
@@ -17,21 +17,21 @@ public final class OperationsImpl implements Operations {
private final OperationsClient innerClient;
- private final com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager serviceManager;
+ private final com.azure.resourcemanager.hybridkubernetes.HybridkubernetesManager serviceManager;
public OperationsImpl(OperationsClient innerClient,
- com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager serviceManager) {
+ com.azure.resourcemanager.hybridkubernetes.HybridkubernetesManager serviceManager) {
this.innerClient = innerClient;
this.serviceManager = serviceManager;
}
- public PagedIterable get() {
- PagedIterable inner = this.serviceClient().get();
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
}
- public PagedIterable get(Context context) {
- PagedIterable inner = this.serviceClient().get(context);
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
}
@@ -39,7 +39,7 @@ private OperationsClient serviceClient() {
return this.innerClient;
}
- private com.azure.resourcemanager.hybridkubernetes.HybridKubernetesManager manager() {
+ private com.azure.resourcemanager.hybridkubernetes.HybridkubernetesManager manager() {
return this.serviceManager;
}
}
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/ResourceManagerUtils.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/ResourceManagerUtils.java
index 7e4c741553f0..5ef3bb575a10 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/ResourceManagerUtils.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/ResourceManagerUtils.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.hybridkubernetes.implementation;
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/ConnectedClusterList.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/models/ConnectedClusterList.java
similarity index 71%
rename from sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/ConnectedClusterList.java
rename to sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/models/ConnectedClusterList.java
index d2813dde03cb..172d608395bf 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/ConnectedClusterList.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/models/ConnectedClusterList.java
@@ -1,10 +1,11 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
-package com.azure.resourcemanager.hybridkubernetes.models;
+package com.azure.resourcemanager.hybridkubernetes.implementation.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
@@ -16,26 +17,26 @@
/**
* The paginated list of connected Clusters.
*/
-@Fluent
+@Immutable
public final class ConnectedClusterList implements JsonSerializable {
/*
- * The list of connected clusters
+ * The ConnectedCluster items on this page
*/
private List value;
/*
- * The link to fetch the next page of connected clusters
+ * The link to the next page of items
*/
private String nextLink;
/**
* Creates an instance of ConnectedClusterList class.
*/
- public ConnectedClusterList() {
+ private ConnectedClusterList() {
}
/**
- * Get the value property: The list of connected clusters.
+ * Get the value property: The ConnectedCluster items on this page.
*
* @return the value value.
*/
@@ -44,18 +45,7 @@ public List value() {
}
/**
- * Set the value property: The list of connected clusters.
- *
- * @param value the value value to set.
- * @return the ConnectedClusterList object itself.
- */
- public ConnectedClusterList withValue(List value) {
- this.value = value;
- return this;
- }
-
- /**
- * Get the nextLink property: The link to fetch the next page of connected clusters.
+ * Get the nextLink property: The link to the next page of items.
*
* @return the nextLink value.
*/
@@ -63,28 +53,22 @@ public String nextLink() {
return this.nextLink;
}
- /**
- * Set the nextLink property: The link to fetch the next page of connected clusters.
- *
- * @param nextLink the nextLink value to set.
- * @return the ConnectedClusterList object itself.
- */
- public ConnectedClusterList 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) {
+ if (value() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property value in model ConnectedClusterList"));
+ } else {
value().forEach(e -> e.validate());
}
}
+ private static final ClientLogger LOGGER = new ClientLogger(ConnectedClusterList.class);
+
/**
* {@inheritDoc}
*/
@@ -102,6 +86,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
* @param jsonReader The JsonReader being read.
* @return An instance of ConnectedClusterList if the JsonReader was pointing to an instance of it, or null if it
* was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
* @throws IOException If an error occurs while reading the ConnectedClusterList.
*/
public static ConnectedClusterList fromJson(JsonReader jsonReader) throws IOException {
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/OperationList.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/models/OperationList.java
similarity index 84%
rename from sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/OperationList.java
rename to sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/models/OperationList.java
index 4577d88e1cb3..6da8b4ef40ad 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/OperationList.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/models/OperationList.java
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
-package com.azure.resourcemanager.hybridkubernetes.models;
+package com.azure.resourcemanager.hybridkubernetes.implementation.models;
-import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
@@ -16,7 +16,7 @@
/**
* The paginated list of connected cluster API operations.
*/
-@Fluent
+@Immutable
public final class OperationList implements JsonSerializable {
/*
* The list of connected cluster API operations.
@@ -31,7 +31,7 @@ public final class OperationList implements JsonSerializable {
/**
* Creates an instance of OperationList class.
*/
- public OperationList() {
+ private OperationList() {
}
/**
@@ -52,17 +52,6 @@ public String nextLink() {
return this.nextLink;
}
- /**
- * Set the nextLink property: The link to fetch the next page of connected cluster API operations.
- *
- * @param nextLink the nextLink value to set.
- * @return the OperationList object itself.
- */
- public OperationList withNextLink(String nextLink) {
- this.nextLink = nextLink;
- return this;
- }
-
/**
* Validates the instance.
*
@@ -90,6 +79,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
* @param jsonReader The JsonReader being read.
* @return An instance of OperationList if the JsonReader was pointing to an instance of it, or null if it was
* pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
* @throws IOException If an error occurs while reading the OperationList.
*/
public static OperationList fromJson(JsonReader jsonReader) throws IOException {
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/package-info.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/package-info.java
index 1ee13719d528..6d5e87885f21 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/package-info.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/package-info.java
@@ -1,9 +1,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
/**
- * Package containing the implementations for HybridKubernetesManagementClient.
- * Hybrid Kubernetes Client.
+ * Package containing the implementations for Hybridkubernetes.
+ * Azure Connected Cluster Resource Provider API for onboarding a Kubernetes Cluster to Azure Arc.
*/
package com.azure.resourcemanager.hybridkubernetes.implementation;
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/AadProfile.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/AadProfile.java
index 13d9b6d44be6..3f4bf64eed1a 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/AadProfile.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/AadProfile.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.hybridkubernetes.models;
@@ -20,7 +20,7 @@ public final class AadProfile implements JsonSerializable {
/*
* Whether to enable Azure RBAC for Kubernetes authorization.
*/
- private Boolean enableAzureRbac;
+ private Boolean enableAzureRBAC;
/*
* The list of AAD group object IDs that will have admin role of the cluster.
@@ -31,7 +31,7 @@ public final class AadProfile implements JsonSerializable {
* The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment
* subscription.
*/
- private String tenantId;
+ private String tenantID;
/**
* Creates an instance of AadProfile class.
@@ -40,22 +40,22 @@ public AadProfile() {
}
/**
- * Get the enableAzureRbac property: Whether to enable Azure RBAC for Kubernetes authorization.
+ * Get the enableAzureRBAC property: Whether to enable Azure RBAC for Kubernetes authorization.
*
- * @return the enableAzureRbac value.
+ * @return the enableAzureRBAC value.
*/
- public Boolean enableAzureRbac() {
- return this.enableAzureRbac;
+ public Boolean enableAzureRBAC() {
+ return this.enableAzureRBAC;
}
/**
- * Set the enableAzureRbac property: Whether to enable Azure RBAC for Kubernetes authorization.
+ * Set the enableAzureRBAC property: Whether to enable Azure RBAC for Kubernetes authorization.
*
- * @param enableAzureRbac the enableAzureRbac value to set.
+ * @param enableAzureRBAC the enableAzureRBAC value to set.
* @return the AadProfile object itself.
*/
- public AadProfile withEnableAzureRbac(Boolean enableAzureRbac) {
- this.enableAzureRbac = enableAzureRbac;
+ public AadProfile withEnableAzureRBAC(Boolean enableAzureRBAC) {
+ this.enableAzureRBAC = enableAzureRBAC;
return this;
}
@@ -80,24 +80,24 @@ public AadProfile withAdminGroupObjectIDs(List adminGroupObjectIDs) {
}
/**
- * Get the tenantId property: The AAD tenant ID to use for authentication. If not specified, will use the tenant of
+ * Get the tenantID property: The AAD tenant ID to use for authentication. If not specified, will use the tenant of
* the deployment subscription.
*
- * @return the tenantId value.
+ * @return the tenantID value.
*/
- public String tenantId() {
- return this.tenantId;
+ public String tenantID() {
+ return this.tenantID;
}
/**
- * Set the tenantId property: The AAD tenant ID to use for authentication. If not specified, will use the tenant of
+ * Set the tenantID property: The AAD tenant ID to use for authentication. If not specified, will use the tenant of
* the deployment subscription.
*
- * @param tenantId the tenantId value to set.
+ * @param tenantID the tenantID value to set.
* @return the AadProfile object itself.
*/
- public AadProfile withTenantId(String tenantId) {
- this.tenantId = tenantId;
+ public AadProfile withTenantID(String tenantID) {
+ this.tenantID = tenantID;
return this;
}
@@ -115,10 +115,10 @@ public void validate() {
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
- jsonWriter.writeBooleanField("enableAzureRBAC", this.enableAzureRbac);
+ jsonWriter.writeBooleanField("enableAzureRBAC", this.enableAzureRBAC);
jsonWriter.writeArrayField("adminGroupObjectIDs", this.adminGroupObjectIDs,
(writer, element) -> writer.writeString(element));
- jsonWriter.writeStringField("tenantID", this.tenantId);
+ jsonWriter.writeStringField("tenantID", this.tenantID);
return jsonWriter.writeEndObject();
}
@@ -138,12 +138,12 @@ public static AadProfile fromJson(JsonReader jsonReader) throws IOException {
reader.nextToken();
if ("enableAzureRBAC".equals(fieldName)) {
- deserializedAadProfile.enableAzureRbac = reader.getNullable(JsonReader::getBoolean);
+ deserializedAadProfile.enableAzureRBAC = reader.getNullable(JsonReader::getBoolean);
} else if ("adminGroupObjectIDs".equals(fieldName)) {
List adminGroupObjectIDs = reader.readArray(reader1 -> reader1.getString());
deserializedAadProfile.adminGroupObjectIDs = adminGroupObjectIDs;
} else if ("tenantID".equals(fieldName)) {
- deserializedAadProfile.tenantId = reader.getString();
+ deserializedAadProfile.tenantID = reader.getString();
} else {
reader.skipChildren();
}
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/ActionType.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/ActionType.java
new file mode 100644
index 000000000000..e41164b957b5
--- /dev/null
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/ActionType.java
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.hybridkubernetes.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import java.util.Collection;
+
+/**
+ * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ */
+public final class ActionType extends ExpandableStringEnum {
+ /**
+ * Actions are for internal-only APIs.
+ */
+ public static final ActionType INTERNAL = fromString("Internal");
+
+ /**
+ * Creates a new instance of ActionType value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public ActionType() {
+ }
+
+ /**
+ * Creates or finds a ActionType from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding ActionType.
+ */
+ public static ActionType fromString(String name) {
+ return fromString(name, ActionType.class);
+ }
+
+ /**
+ * Gets known ActionType values.
+ *
+ * @return known ActionType values.
+ */
+ public static Collection values() {
+ return values(ActionType.class);
+ }
+}
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/AgentError.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/AgentError.java
index bc9fff440971..1ea951b09686 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/AgentError.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/AgentError.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.hybridkubernetes.models;
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/ArcAgentProfile.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/ArcAgentProfile.java
index 3f04a4baa00e..3eadacb15b57 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/ArcAgentProfile.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/ArcAgentProfile.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.hybridkubernetes.models;
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/ArcAgentryConfigurations.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/ArcAgentryConfigurations.java
index 2be04acd8277..dc140fe19e67 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/ArcAgentryConfigurations.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/ArcAgentryConfigurations.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.hybridkubernetes.models;
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/AuthenticationMethod.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/AuthenticationMethod.java
index 638312c62625..fba4e32a9125 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/AuthenticationMethod.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/AuthenticationMethod.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.hybridkubernetes.models;
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/AutoUpgradeOptions.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/AutoUpgradeOptions.java
index 9259c521095d..36ce6bf59933 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/AutoUpgradeOptions.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/AutoUpgradeOptions.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.hybridkubernetes.models;
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/AzureHybridBenefit.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/AzureHybridBenefit.java
index 5b566963937d..32492e4a2a37 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/AzureHybridBenefit.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/AzureHybridBenefit.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.hybridkubernetes.models;
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/ConnectedCluster.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/ConnectedCluster.java
index 36a605be02d9..074cb2023039 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/ConnectedCluster.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/ConnectedCluster.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.hybridkubernetes.models;
@@ -67,7 +67,7 @@ public interface ConnectedCluster {
ConnectedClusterKind kind();
/**
- * Gets the systemData property: Metadata pertaining to creation and last modification of the resource.
+ * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
* @return the systemData value.
*/
@@ -693,7 +693,9 @@ interface WithAzureHybridBenefit {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return cluster user credentials of the connected cluster with a specified resource group and name along with
+ * @return cluster user credentials of a connected cluster
+ *
+ * Gets cluster user credentials of the connected cluster with a specified resource group and name along with
* {@link Response}.
*/
Response listClusterUserCredentialWithResponse(ListClusterUserCredentialProperties properties,
@@ -708,7 +710,9 @@ Response listClusterUserCredentialWithResponse(ListClusterUse
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return cluster user credentials of the connected cluster with a specified resource group and name.
+ * @return cluster user credentials of a connected cluster
+ *
+ * Gets cluster user credentials of the connected cluster with a specified resource group and name.
*/
CredentialResults listClusterUserCredential(ListClusterUserCredentialProperties properties);
}
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/ConnectedClusterIdentity.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/ConnectedClusterIdentity.java
index 2ac15eb67520..0a7ffcc03f87 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/ConnectedClusterIdentity.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/ConnectedClusterIdentity.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.hybridkubernetes.models;
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/ConnectedClusterKind.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/ConnectedClusterKind.java
index 80845bba1cc5..6711f5e2ac69 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/ConnectedClusterKind.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/ConnectedClusterKind.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.hybridkubernetes.models;
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/ConnectedClusterPatch.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/ConnectedClusterPatch.java
index 144fa0d78c34..f8652a236c87 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/ConnectedClusterPatch.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/ConnectedClusterPatch.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.hybridkubernetes.models;
diff --git a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/ConnectedClusters.java b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/ConnectedClusters.java
index 5773cc7e80cb..cf9f82f6c0a5 100644
--- a/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/ConnectedClusters.java
+++ b/sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/models/ConnectedClusters.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.resourcemanager.hybridkubernetes.models;
@@ -24,7 +24,10 @@ public interface ConnectedClusters {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a connected cluster along with {@link Response}.
+ * @return the properties of the specified connected cluster.
+ *
+ * Returns the properties of the specified connected cluster, including name, identity, properties, and additional
+ * cluster details along with {@link Response}.
*/
Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName,
Context context);
@@ -40,7 +43,10 @@ Response getByResourceGroupWithResponse(String resourceGroupNa
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return represents a connected cluster.
+ * @return the properties of the specified connected cluster.
+ *
+ * Returns the properties of the specified connected cluster, including name, identity, properties, and additional
+ * cluster details.
*/
ConnectedCluster getByResourceGroup(String resourceGroupName, String clusterName);
@@ -72,89 +78,93 @@ Response